home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / winspool.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1998-02-09  |  81.8 KB  |  2,004 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Run-time Library                         }
  5. {       Windows 32bit API Interface Unit                }
  6. {                                                       }
  7. {       Copyright (c) 1996,98 Borland International     }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit WinSpool;
  12.  
  13. {$WEAKPACKAGEUNIT}
  14.  
  15. interface
  16.  
  17. uses Windows;
  18.  
  19. (*$HPPEMIT '' *)
  20. (*$HPPEMIT '#include <winspool.h>' *)
  21. (*$HPPEMIT '' *)
  22.  
  23. type
  24.   PPrinterInfo1A = ^TPrinterInfo1A;
  25.   PPrinterInfo1W = ^TPrinterInfo1W;
  26.   PPrinterInfo1 = PPrinterInfo1A;
  27.   {$EXTERNALSYM _PRINTER_INFO_1A}
  28.   _PRINTER_INFO_1A = record
  29.     Flags: DWORD;
  30.     pDescription: PAnsiChar;
  31.     pName: PAnsiChar;
  32.     pComment: PAnsiChar;
  33.   end;
  34.   {$EXTERNALSYM _PRINTER_INFO_1W}
  35.   _PRINTER_INFO_1W = record
  36.     Flags: DWORD;
  37.     pDescription: PWideChar;
  38.     pName: PWideChar;
  39.     pComment: PWideChar;
  40.   end;
  41.   {$EXTERNALSYM _PRINTER_INFO_1}
  42.   _PRINTER_INFO_1 = _PRINTER_INFO_1A;
  43.   TPrinterInfo1A = _PRINTER_INFO_1A;
  44.   TPrinterInfo1W = _PRINTER_INFO_1W;
  45.   TPrinterInfo1 = TPrinterInfo1A;
  46.   {$EXTERNALSYM PRINTER_INFO_1A}
  47.   PRINTER_INFO_1A = _PRINTER_INFO_1A;
  48.   {$EXTERNALSYM PRINTER_INFO_1W}
  49.   PRINTER_INFO_1W = _PRINTER_INFO_1W;
  50.   {$EXTERNALSYM PRINTER_INFO_1}
  51.   PRINTER_INFO_1 = PRINTER_INFO_1A;
  52.  
  53.   PPrinterInfo2A = ^TPrinterInfo2A;
  54.   PPrinterInfo2W = ^TPrinterInfo2W;
  55.   PPrinterInfo2 = PPrinterInfo2A;
  56.   {$EXTERNALSYM _PRINTER_INFO_2A}
  57.   _PRINTER_INFO_2A = record
  58.     pServerName: PAnsiChar;
  59.     pPrinterName: PAnsiChar;
  60.     pShareName: PAnsiChar;
  61.     pPortName: PAnsiChar;
  62.     pDriverName: PAnsiChar;
  63.     pComment: PAnsiChar;
  64.     pLocation: PAnsiChar;
  65.     pDevMode: PDeviceModeA;
  66.     pSepFile: PAnsiChar;
  67.     pPrintProcessor: PAnsiChar;
  68.     pDatatype: PAnsiChar;
  69.     pParameters: PAnsiChar;
  70.     pSecurityDescriptor: PSecurityDescriptor;
  71.     Attributes: DWORD;
  72.     Priority: DWORD;
  73.     DefaultPriority: DWORD;
  74.     StartTime: DWORD;
  75.     UntilTime: DWORD;
  76.     Status: DWORD;
  77.     cJobs: DWORD;
  78.     AveragePPM: DWORD;
  79.   end;
  80.   {$EXTERNALSYM _PRINTER_INFO_2W}
  81.   _PRINTER_INFO_2W = record
  82.     pServerName: PWideChar;
  83.     pPrinterName: PWideChar;
  84.     pShareName: PWideChar;
  85.     pPortName: PWideChar;
  86.     pDriverName: PWideChar;
  87.     pComment: PWideChar;
  88.     pLocation: PWideChar;
  89.     pDevMode: PDeviceModeW;
  90.     pSepFile: PWideChar;
  91.     pPrintProcessor: PWideChar;
  92.     pDatatype: PWideChar;
  93.     pParameters: PWideChar;
  94.     pSecurityDescriptor: PSecurityDescriptor;
  95.     Attributes: DWORD;
  96.     Priority: DWORD;
  97.     DefaultPriority: DWORD;
  98.     StartTime: DWORD;
  99.     UntilTime: DWORD;
  100.     Status: DWORD;
  101.     cJobs: DWORD;
  102.     AveragePPM: DWORD;
  103.   end;
  104.   {$EXTERNALSYM _PRINTER_INFO_2}
  105.   _PRINTER_INFO_2 = _PRINTER_INFO_2A;
  106.   TPrinterInfo2A = _PRINTER_INFO_2A;
  107.   TPrinterInfo2W = _PRINTER_INFO_2W;
  108.   TPrinterInfo2 = TPrinterInfo2A;
  109.   {$EXTERNALSYM PRINTER_INFO_2A}
  110.   PRINTER_INFO_2A = _PRINTER_INFO_2A;
  111.   {$EXTERNALSYM PRINTER_INFO_2W}
  112.   PRINTER_INFO_2W = _PRINTER_INFO_2W;
  113.   {$EXTERNALSYM PRINTER_INFO_2}
  114.   PRINTER_INFO_2 = PRINTER_INFO_2A;
  115.  
  116.   PPrinterInfo3 = ^TPrinterInfo3;
  117.   {$EXTERNALSYM _PRINTER_INFO_3}
  118.   _PRINTER_INFO_3 = record
  119.     pSecurityDescriptor: PSecurityDescriptor;
  120.   end;
  121.   TPrinterInfo3 = _PRINTER_INFO_3;
  122.   {$EXTERNALSYM PRINTER_INFO_3}
  123.   PRINTER_INFO_3 = _PRINTER_INFO_3;
  124.  
  125.   PPrinterInfo4A = ^TPrinterInfo4A;
  126.   PPrinterInfo4W = ^TPrinterInfo4W;
  127.   PPrinterInfo4 = PPrinterInfo4A;
  128.   {$EXTERNALSYM _PRINTER_INFO_4A}
  129.   _PRINTER_INFO_4A = record
  130.     pPrinterName: PAnsiChar;
  131.     pServerName: PAnsiChar;
  132.     Attributes: DWORD;
  133.   end;
  134.   {$EXTERNALSYM _PRINTER_INFO_4W}
  135.   _PRINTER_INFO_4W = record
  136.     pPrinterName: PWideChar;
  137.     pServerName: PWideChar;
  138.     Attributes: DWORD;
  139.   end;
  140.   {$EXTERNALSYM _PRINTER_INFO_4}
  141.   _PRINTER_INFO_4 = _PRINTER_INFO_4A;
  142.   TPrinterInfo4A = _PRINTER_INFO_4A;
  143.   TPrinterInfo4W = _PRINTER_INFO_4W;
  144.   TPrinterInfo4 = TPrinterInfo4A;
  145.   {$EXTERNALSYM PRINTER_INFO_4A}
  146.   PRINTER_INFO_4A = _PRINTER_INFO_4A;
  147.   {$EXTERNALSYM PRINTER_INFO_4W}
  148.   PRINTER_INFO_4W = _PRINTER_INFO_4W;
  149.   {$EXTERNALSYM PRINTER_INFO_4}
  150.   PRINTER_INFO_4 = PRINTER_INFO_4A;
  151.  
  152.   PPrinterInfo5A = ^TPrinterInfo5A;
  153.   PPrinterInfo5W = ^TPrinterInfo5W;
  154.   PPrinterInfo5 = PPrinterInfo5A;
  155.   {$EXTERNALSYM _PRINTER_INFO_5A}
  156.   _PRINTER_INFO_5A = record
  157.     pPrinterName: PAnsiChar;
  158.     pPortName: PAnsiChar;
  159.     Attributes: DWORD;
  160.     DeviceNotSelectedTimeout: DWORD;
  161.     TransmissionRetryTimeout: DWORD;
  162.   end;
  163.   {$EXTERNALSYM _PRINTER_INFO_5W}
  164.   _PRINTER_INFO_5W = record
  165.     pPrinterName: PWideChar;
  166.     pPortName: PWideChar;
  167.     Attributes: DWORD;
  168.     DeviceNotSelectedTimeout: DWORD;
  169.     TransmissionRetryTimeout: DWORD;
  170.   end;
  171.   {$EXTERNALSYM _PRINTER_INFO_5}
  172.   _PRINTER_INFO_5 = _PRINTER_INFO_5A;
  173.   TPrinterInfo5A = _PRINTER_INFO_5A;
  174.   TPrinterInfo5W = _PRINTER_INFO_5W;
  175.   TPrinterInfo5 = TPrinterInfo5A;
  176.   {$EXTERNALSYM PRINTER_INFO_5A}
  177.   PRINTER_INFO_5A = _PRINTER_INFO_5A;
  178.   {$EXTERNALSYM PRINTER_INFO_5W}
  179.   PRINTER_INFO_5W = _PRINTER_INFO_5W;
  180.   {$EXTERNALSYM PRINTER_INFO_5}
  181.   PRINTER_INFO_5 = PRINTER_INFO_5A;
  182.  
  183.   PPrinterInfo6 = ^TPrinterInfo6;
  184.   {$EXTERNALSYM _PRINTER_INFO_6}
  185.   _PRINTER_INFO_6 = record
  186.     dwStatus: DWORD;
  187.   end;
  188.   TPrinterInfo6 = _PRINTER_INFO_6;
  189.   {$EXTERNALSYM PRINTER_INFO_6}
  190.   PRINTER_INFO_6 = _PRINTER_INFO_6;
  191.  
  192. const
  193.   {$EXTERNALSYM PRINTER_CONTROL_PAUSE}
  194.   PRINTER_CONTROL_PAUSE            = 1;
  195.   {$EXTERNALSYM PRINTER_CONTROL_RESUME}
  196.   PRINTER_CONTROL_RESUME           = 2;
  197.   {$EXTERNALSYM PRINTER_CONTROL_PURGE}
  198.   PRINTER_CONTROL_PURGE            = 3;
  199.   {$EXTERNALSYM PRINTER_CONTROL_SET_STATUS}
  200.   PRINTER_CONTROL_SET_STATUS       = 4;
  201.  
  202.   {$EXTERNALSYM PRINTER_STATUS_PAUSED}
  203.   PRINTER_STATUS_PAUSED            = $00000001;
  204.   {$EXTERNALSYM PRINTER_STATUS_ERROR}
  205.   PRINTER_STATUS_ERROR             = $00000002;
  206.   {$EXTERNALSYM PRINTER_STATUS_PENDING_DELETION}
  207.   PRINTER_STATUS_PENDING_DELETION  = $00000004;
  208.   {$EXTERNALSYM PRINTER_STATUS_PAPER_JAM}
  209.   PRINTER_STATUS_PAPER_JAM         = $00000008;
  210.   {$EXTERNALSYM PRINTER_STATUS_PAPER_OUT}
  211.   PRINTER_STATUS_PAPER_OUT         = $00000010;
  212.   {$EXTERNALSYM PRINTER_STATUS_MANUAL_FEED}
  213.   PRINTER_STATUS_MANUAL_FEED       = $00000020;
  214.   {$EXTERNALSYM PRINTER_STATUS_PAPER_PROBLEM}
  215.   PRINTER_STATUS_PAPER_PROBLEM     = $00000040;
  216.   {$EXTERNALSYM PRINTER_STATUS_OFFLINE}
  217.   PRINTER_STATUS_OFFLINE           = $00000080;
  218.   {$EXTERNALSYM PRINTER_STATUS_IO_ACTIVE}
  219.   PRINTER_STATUS_IO_ACTIVE         = $00000100;
  220.   {$EXTERNALSYM PRINTER_STATUS_BUSY}
  221.   PRINTER_STATUS_BUSY              = $00000200;
  222.   {$EXTERNALSYM PRINTER_STATUS_PRINTING}
  223.   PRINTER_STATUS_PRINTING          = $00000400;
  224.   {$EXTERNALSYM PRINTER_STATUS_OUTPUT_BIN_FULL}
  225.   PRINTER_STATUS_OUTPUT_BIN_FULL   = $00000800;
  226.   {$EXTERNALSYM PRINTER_STATUS_NOT_AVAILABLE}
  227.   PRINTER_STATUS_NOT_AVAILABLE     = $00001000;
  228.   {$EXTERNALSYM PRINTER_STATUS_WAITING}
  229.   PRINTER_STATUS_WAITING           = $00002000;
  230.   {$EXTERNALSYM PRINTER_STATUS_PROCESSING}
  231.   PRINTER_STATUS_PROCESSING        = $00004000;
  232.   {$EXTERNALSYM PRINTER_STATUS_INITIALIZING}
  233.   PRINTER_STATUS_INITIALIZING      = $00008000;
  234.   {$EXTERNALSYM PRINTER_STATUS_WARMING_UP}
  235.   PRINTER_STATUS_WARMING_UP        = $00010000;
  236.   {$EXTERNALSYM PRINTER_STATUS_TONER_LOW}
  237.   PRINTER_STATUS_TONER_LOW         = $00020000;
  238.   {$EXTERNALSYM PRINTER_STATUS_NO_TONER}
  239.   PRINTER_STATUS_NO_TONER          = $00040000;
  240.   {$EXTERNALSYM PRINTER_STATUS_PAGE_PUNT}
  241.   PRINTER_STATUS_PAGE_PUNT         = $00080000;
  242.   {$EXTERNALSYM PRINTER_STATUS_USER_INTERVENTION}
  243.   PRINTER_STATUS_USER_INTERVENTION = $00100000;
  244.   {$EXTERNALSYM PRINTER_STATUS_OUT_OF_MEMORY}
  245.   PRINTER_STATUS_OUT_OF_MEMORY     = $00200000;
  246.   {$EXTERNALSYM PRINTER_STATUS_DOOR_OPEN}
  247.   PRINTER_STATUS_DOOR_OPEN         = $00400000;
  248.   {$EXTERNALSYM PRINTER_STATUS_SERVER_UNKNOWN}
  249.   PRINTER_STATUS_SERVER_UNKNOWN    = $00800000;
  250.   {$EXTERNALSYM PRINTER_STATUS_POWER_SAVE}
  251.   PRINTER_STATUS_POWER_SAVE        = $01000000;
  252.  
  253.   {$EXTERNALSYM PRINTER_ATTRIBUTE_QUEUED}
  254.   PRINTER_ATTRIBUTE_QUEUED         = $00000001;
  255.   {$EXTERNALSYM PRINTER_ATTRIBUTE_DIRECT}
  256.   PRINTER_ATTRIBUTE_DIRECT         = $00000002;
  257.   {$EXTERNALSYM PRINTER_ATTRIBUTE_DEFAULT}
  258.   PRINTER_ATTRIBUTE_DEFAULT        = $00000004;
  259.   {$EXTERNALSYM PRINTER_ATTRIBUTE_SHARED}
  260.   PRINTER_ATTRIBUTE_SHARED         = $00000008;
  261.   {$EXTERNALSYM PRINTER_ATTRIBUTE_NETWORK}
  262.   PRINTER_ATTRIBUTE_NETWORK        = $00000010;
  263.   {$EXTERNALSYM PRINTER_ATTRIBUTE_HIDDEN}
  264.   PRINTER_ATTRIBUTE_HIDDEN         = $00000020;
  265.   {$EXTERNALSYM PRINTER_ATTRIBUTE_LOCAL}
  266.   PRINTER_ATTRIBUTE_LOCAL          = $00000040;
  267.  
  268.   {$EXTERNALSYM PRINTER_ATTRIBUTE_ENABLE_DEVQ}
  269.   PRINTER_ATTRIBUTE_ENABLE_DEVQ       = $00000080;
  270.   {$EXTERNALSYM PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS}
  271.   PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS   = $00000100;
  272.   {$EXTERNALSYM PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST}
  273.   PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = $00000200;
  274.  
  275.   {$EXTERNALSYM PRINTER_ATTRIBUTE_WORK_OFFLINE}
  276.   PRINTER_ATTRIBUTE_WORK_OFFLINE   = $00000400;
  277.   {$EXTERNALSYM PRINTER_ATTRIBUTE_ENABLE_BIDI}
  278.   PRINTER_ATTRIBUTE_ENABLE_BIDI    = $00000800;
  279.   {$EXTERNALSYM PRINTER_ATTRIBUTE_RAW_ONLY}
  280.   PRINTER_ATTRIBUTE_RAW_ONLY       = $00001000;
  281.  
  282.  
  283.   {$EXTERNALSYM NO_PRIORITY}
  284.   NO_PRIORITY   = 0;
  285.   {$EXTERNALSYM MAX_PRIORITY}
  286.   MAX_PRIORITY = 99;
  287.   {$EXTERNALSYM MIN_PRIORITY}
  288.   MIN_PRIORITY  = 1;
  289.   {$EXTERNALSYM DEF_PRIORITY}
  290.   DEF_PRIORITY  = 1;
  291.  
  292. type
  293.   PJobInfo1A = ^TJobInfo1A;
  294.   PJobInfo1W = ^TJobInfo1W;
  295.   PJobInfo1 = PJobInfo1A;
  296.   {$EXTERNALSYM _JOB_INFO_1A}
  297.   _JOB_INFO_1A = record
  298.    JobId: DWORD;
  299.    pPrinterName: PAnsiChar;
  300.    pMachineName: PAnsiChar;
  301.    pUserName: PAnsiChar;
  302.    pDocument: PAnsiChar;
  303.    pDatatype: PAnsiChar;
  304.    pStatus: PAnsiChar;
  305.    Status: DWORD;
  306.    Priority: DWORD;
  307.    Position: DWORD;
  308.    TotalPages: DWORD;
  309.    PagesPrinted: DWORD;
  310.    Submitted: TSystemTime;
  311.   end;
  312.   {$EXTERNALSYM _JOB_INFO_1W}
  313.   _JOB_INFO_1W = record
  314.    JobId: DWORD;
  315.    pPrinterName: PWideChar;
  316.    pMachineName: PWideChar;
  317.    pUserName: PWideChar;
  318.    pDocument: PWideChar;
  319.    pDatatype: PWideChar;
  320.    pStatus: PWideChar;
  321.    Status: DWORD;
  322.    Priority: DWORD;
  323.    Position: DWORD;
  324.    TotalPages: DWORD;
  325.    PagesPrinted: DWORD;
  326.    Submitted: TSystemTime;
  327.   end;
  328.   {$EXTERNALSYM _JOB_INFO_1}
  329.   _JOB_INFO_1 = _JOB_INFO_1A;
  330.   TJobInfo1A = _JOB_INFO_1A;
  331.   TJobInfo1W = _JOB_INFO_1W;
  332.   TJobInfo1 = TJobInfo1A;
  333.   {$EXTERNALSYM JOB_INFO_1A}
  334.   JOB_INFO_1A = _JOB_INFO_1A;
  335.   {$EXTERNALSYM JOB_INFO_1W}
  336.   JOB_INFO_1W = _JOB_INFO_1W;
  337.   {$EXTERNALSYM JOB_INFO_1}
  338.   JOB_INFO_1 = JOB_INFO_1A;
  339.  
  340.   PJobInfo2A = ^TJobInfo2A;
  341.   PJobInfo2W = ^TJobInfo2W;
  342.   PJobInfo2 = PJobInfo2A;
  343.   {$EXTERNALSYM _JOB_INFO_2A}
  344.   _JOB_INFO_2A = record
  345.    JobId: DWORD;
  346.    pPrinterName: PAnsiChar;
  347.    pMachineName: PAnsiChar;
  348.    pUserName: PAnsiChar;
  349.    pDocument: PAnsiChar;
  350.    pNotifyName: PAnsiChar;
  351.    pDatatype: PAnsiChar;
  352.    pPrintProcessor: PAnsiChar;
  353.    pParameters: PAnsiChar;
  354.    pDriverName: PAnsiChar;
  355.    pDevMode: PDeviceModeA;
  356.    pStatus: PAnsiChar;
  357.    pSecurityDescriptor: PSECURITY_DESCRIPTOR;
  358.    Status: DWORD;
  359.    Priority: DWORD;
  360.    Position: DWORD;
  361.    StartTime: DWORD;
  362.    UntilTime: DWORD;
  363.    TotalPages: DWORD;
  364.    Size: DWORD;
  365.    Submitted: TSystemTime;   { Time the job was spooled }
  366.    Time: DWORD;              { How many seconds the job has been printing }
  367.    PagesPrinted: DWORD;
  368.   end;
  369.   {$EXTERNALSYM _JOB_INFO_2W}
  370.   _JOB_INFO_2W = record
  371.    JobId: DWORD;
  372.    pPrinterName: PWideChar;
  373.    pMachineName: PWideChar;
  374.    pUserName: PWideChar;
  375.    pDocument: PWideChar;
  376.    pNotifyName: PWideChar;
  377.    pDatatype: PWideChar;
  378.    pPrintProcessor: PWideChar;
  379.    pParameters: PWideChar;
  380.    pDriverName: PWideChar;
  381.    pDevMode: PDeviceModeW;
  382.    pStatus: PWideChar;
  383.    pSecurityDescriptor: PSECURITY_DESCRIPTOR;
  384.    Status: DWORD;
  385.    Priority: DWORD;
  386.    Position: DWORD;
  387.    StartTime: DWORD;
  388.    UntilTime: DWORD;
  389.    TotalPages: DWORD;
  390.    Size: DWORD;
  391.    Submitted: TSystemTime;   { Time the job was spooled }
  392.    Time: DWORD;              { How many seconds the job has been printing }
  393.    PagesPrinted: DWORD;
  394.   end;
  395.   {$EXTERNALSYM _JOB_INFO_2}
  396.   _JOB_INFO_2 = _JOB_INFO_2A;
  397.   TJobInfo2A = _JOB_INFO_2A;
  398.   TJobInfo2W = _JOB_INFO_2W;
  399.   TJobInfo2 = TJobInfo2A;
  400.   {$EXTERNALSYM JOB_INFO_2A}
  401.   JOB_INFO_2A = _JOB_INFO_2A;
  402.   {$EXTERNALSYM JOB_INFO_2W}
  403.   JOB_INFO_2W = _JOB_INFO_2W;
  404.   {$EXTERNALSYM JOB_INFO_2}
  405.   JOB_INFO_2 = JOB_INFO_2A;
  406.  
  407.   PJobInfo3 = ^TJobInfo3;
  408.   {$EXTERNALSYM _JOB_INFO_3}
  409.   _JOB_INFO_3 = record
  410.     JobId: DWORD;
  411.     NextJobId: DWORD;
  412.     Reserved: DWORD;
  413.   end;
  414.   TJobInfo3 = _JOB_INFO_3;
  415.   {$EXTERNALSYM JOB_INFO_3}
  416.   JOB_INFO_3 = _JOB_INFO_3;
  417.  
  418. const
  419.   {$EXTERNALSYM JOB_CONTROL_PAUSE}
  420.   JOB_CONTROL_PAUSE              = 1;
  421.   {$EXTERNALSYM JOB_CONTROL_RESUME}
  422.   JOB_CONTROL_RESUME             = 2;
  423.   {$EXTERNALSYM JOB_CONTROL_CANCEL}
  424.   JOB_CONTROL_CANCEL             = 3;
  425.   {$EXTERNALSYM JOB_CONTROL_RESTART}
  426.   JOB_CONTROL_RESTART            = 4;
  427.   {$EXTERNALSYM JOB_CONTROL_DELETE}
  428.   JOB_CONTROL_DELETE             = 5;
  429.   {$EXTERNALSYM JOB_CONTROL_SENT_TO_PRINTER}
  430.   JOB_CONTROL_SENT_TO_PRINTER    = 6;
  431.   {$EXTERNALSYM JOB_CONTROL_LAST_PAGE_EJECTED}
  432.   JOB_CONTROL_LAST_PAGE_EJECTED  = 7;
  433.  
  434.   {$EXTERNALSYM JOB_STATUS_PAUSED}
  435.   JOB_STATUS_PAUSED                   = $00000001;
  436.   {$EXTERNALSYM JOB_STATUS_ERROR}
  437.   JOB_STATUS_ERROR                    = $00000002;
  438.   {$EXTERNALSYM JOB_STATUS_DELETING}
  439.   JOB_STATUS_DELETING                 = $00000004;
  440.   {$EXTERNALSYM JOB_STATUS_SPOOLING}
  441.   JOB_STATUS_SPOOLING                 = $00000008;
  442.   {$EXTERNALSYM JOB_STATUS_PRINTING}
  443.   JOB_STATUS_PRINTING                 = $00000010;
  444.   {$EXTERNALSYM JOB_STATUS_OFFLINE}
  445.   JOB_STATUS_OFFLINE                  = $00000020;
  446.   {$EXTERNALSYM JOB_STATUS_PAPEROUT}
  447.   JOB_STATUS_PAPEROUT                 = $00000040;
  448.   {$EXTERNALSYM JOB_STATUS_PRINTED}
  449.   JOB_STATUS_PRINTED                  = $00000080;
  450.   {$EXTERNALSYM JOB_STATUS_DELETED}
  451.   JOB_STATUS_DELETED                  = $00000100;
  452.   {$EXTERNALSYM JOB_STATUS_BLOCKED_DEVQ}
  453.   JOB_STATUS_BLOCKED_DEVQ             = $00000200;
  454.   {$EXTERNALSYM JOB_STATUS_USER_INTERVENTION}
  455.   JOB_STATUS_USER_INTERVENTION        = $00000400;
  456.   {$EXTERNALSYM JOB_STATUS_RESTART}
  457.   JOB_STATUS_RESTART                  = $00000800;
  458.  
  459.   {$EXTERNALSYM JOB_POSITION_UNSPECIFIED}
  460.   JOB_POSITION_UNSPECIFIED       = 0;
  461.  
  462. type
  463.   PAddJobInfo1A = ^TAddJobInfo1A;
  464.   PAddJobInfo1W = ^TAddJobInfo1W;
  465.   PAddJobInfo1 = PAddJobInfo1A;
  466.   {$EXTERNALSYM _ADDJOB_INFO_1A}
  467.   _ADDJOB_INFO_1A = record
  468.     Path: PAnsiChar;
  469.     JobId: DWORD;
  470.   end;
  471.   {$EXTERNALSYM _ADDJOB_INFO_1W}
  472.   _ADDJOB_INFO_1W = record
  473.     Path: PWideChar;
  474.     JobId: DWORD;
  475.   end;
  476.   {$EXTERNALSYM _ADDJOB_INFO_1}
  477.   _ADDJOB_INFO_1 = _ADDJOB_INFO_1A;
  478.   TAddJobInfo1A = _ADDJOB_INFO_1A;
  479.   TAddJobInfo1W = _ADDJOB_INFO_1W;
  480.   TAddJobInfo1 = TAddJobInfo1A;
  481.   {$EXTERNALSYM ADDJOB_INFO_1A}
  482.   ADDJOB_INFO_1A = _ADDJOB_INFO_1A;
  483.   {$EXTERNALSYM ADDJOB_INFO_1W}
  484.   ADDJOB_INFO_1W = _ADDJOB_INFO_1W;
  485.   {$EXTERNALSYM ADDJOB_INFO_1}
  486.   ADDJOB_INFO_1 = ADDJOB_INFO_1A;
  487.  
  488.   PDriverInfo1A = ^TDriverInfo1A;
  489.   PDriverInfo1W = ^TDriverInfo1W;
  490.   PDriverInfo1 = PDriverInfo1A;
  491.   {$EXTERNALSYM _DRIVER_INFO_1A}
  492.   _DRIVER_INFO_1A = record
  493.     pName: PAnsiChar;              { QMS 810 }
  494.   end;
  495.   {$EXTERNALSYM _DRIVER_INFO_1W}
  496.   _DRIVER_INFO_1W = record
  497.     pName: PWideChar;              { QMS 810 }
  498.   end;
  499.   {$EXTERNALSYM _DRIVER_INFO_1}
  500.   _DRIVER_INFO_1 = _DRIVER_INFO_1A;
  501.   TDriverInfo1A = _DRIVER_INFO_1A;
  502.   TDriverInfo1W = _DRIVER_INFO_1W;
  503.   TDriverInfo1 = TDriverInfo1A;
  504.   {$EXTERNALSYM DRIVER_INFO_1A}
  505.   DRIVER_INFO_1A = _DRIVER_INFO_1A;
  506.   {$EXTERNALSYM DRIVER_INFO_1W}
  507.   DRIVER_INFO_1W = _DRIVER_INFO_1W;
  508.   {$EXTERNALSYM DRIVER_INFO_1}
  509.   DRIVER_INFO_1 = DRIVER_INFO_1A;
  510.  
  511.   PDriverInfo2A = ^TDriverInfo2A;
  512.   PDriverInfo2W = ^TDriverInfo2W;
  513.   PDriverInfo2 = PDriverInfo2A;
  514.   {$EXTERNALSYM _DRIVER_INFO_2A}
  515.   _DRIVER_INFO_2A = record
  516.     cVersion: DWORD;
  517.     pName: PAnsiChar;              { QMS 810 }
  518.     pEnvironment: PAnsiChar;       { Win32 x86 }
  519.     pDriverPath: PAnsiChar;        { c:\drivers\pscript.dll }
  520.     pDataFile: PAnsiChar;          { c:\drivers\QMS810.PPD }
  521.     pConfigFile: PAnsiChar;        { c:\drivers\PSCRPTUI.DLL }
  522.   end;
  523.   {$EXTERNALSYM _DRIVER_INFO_2W}
  524.   _DRIVER_INFO_2W = record
  525.     cVersion: DWORD;
  526.     pName: PWideChar;              { QMS 810 }
  527.     pEnvironment: PWideChar;       { Win32 x86 }
  528.     pDriverPath: PWideChar;        { c:\drivers\pscript.dll }
  529.     pDataFile: PWideChar;          { c:\drivers\QMS810.PPD }
  530.     pConfigFile: PWideChar;        { c:\drivers\PSCRPTUI.DLL }
  531.   end;
  532.   {$EXTERNALSYM _DRIVER_INFO_2}
  533.   _DRIVER_INFO_2 = _DRIVER_INFO_2A;
  534.   TDriverInfo2A = _DRIVER_INFO_2A;
  535.   TDriverInfo2W = _DRIVER_INFO_2W;
  536.   TDriverInfo2 = TDriverInfo2A;
  537.   {$EXTERNALSYM DRIVER_INFO_2A}
  538.   DRIVER_INFO_2A = _DRIVER_INFO_2A;
  539.   {$EXTERNALSYM DRIVER_INFO_2W}
  540.   DRIVER_INFO_2W = _DRIVER_INFO_2W;
  541.   {$EXTERNALSYM DRIVER_INFO_2}
  542.   DRIVER_INFO_2 = DRIVER_INFO_2A;
  543.  
  544.   PDriverInfo3A = ^TDriverInfo3A;
  545.   PDriverInfo3W = ^TDriverInfo3W;
  546.   PDriverInfo3 = PDriverInfo3A;
  547.   {$EXTERNALSYM _DRIVER_INFO_3A}
  548.   _DRIVER_INFO_3A = record
  549.     cVersion: DWORD;
  550.     pName: PAnsiChar;                    { QMS 810 }
  551.     pEnvironment: PAnsiChar;             { Win32 x86 }
  552.     pDriverPath: PAnsiChar;              { c:\drivers\pscript.dll }
  553.     pDataFile: PAnsiChar;                { c:\drivers\QMS810.PPD }
  554.     pConfigFile: PAnsiChar;              { c:\drivers\PSCRPTUI.DLL }
  555.     pHelpFile: PAnsiChar;                { c:\drivers\PSCRPTUI.HLP }
  556.     pDependentFiles: PAnsiChar;          { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
  557.     pMonitorName: PAnsiChar;             { "PJL monitor" }
  558.     pDefaultDataType: PAnsiChar;         { "EMF" }
  559.   end;
  560.   {$EXTERNALSYM _DRIVER_INFO_3W}
  561.   _DRIVER_INFO_3W = record
  562.     cVersion: DWORD;
  563.     pName: PWideChar;                    { QMS 810 }
  564.     pEnvironment: PWideChar;             { Win32 x86 }
  565.     pDriverPath: PWideChar;              { c:\drivers\pscript.dll }
  566.     pDataFile: PWideChar;                { c:\drivers\QMS810.PPD }
  567.     pConfigFile: PWideChar;              { c:\drivers\PSCRPTUI.DLL }
  568.     pHelpFile: PWideChar;                { c:\drivers\PSCRPTUI.HLP }
  569.     pDependentFiles: PWideChar;          { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
  570.     pMonitorName: PWideChar;             { "PJL monitor" }
  571.     pDefaultDataType: PWideChar;         { "EMF" }
  572.   end;
  573.   {$EXTERNALSYM _DRIVER_INFO_3}
  574.   _DRIVER_INFO_3 = _DRIVER_INFO_3A;
  575.   TDriverInfo3A = _DRIVER_INFO_3A;
  576.   TDriverInfo3W = _DRIVER_INFO_3W;
  577.   TDriverInfo3 = TDriverInfo3A;
  578.   {$EXTERNALSYM DRIVER_INFO_3A}
  579.   DRIVER_INFO_3A = _DRIVER_INFO_3A;
  580.   {$EXTERNALSYM DRIVER_INFO_3W}
  581.   DRIVER_INFO_3W = _DRIVER_INFO_3W;
  582.   {$EXTERNALSYM DRIVER_INFO_3}
  583.   DRIVER_INFO_3 = DRIVER_INFO_3A;
  584.  
  585.   PDocInfo1A = ^TDocInfo1A;
  586.   PDocInfo1W = ^TDocInfo1W;
  587.   PDocInfo1 = PDocInfo1A;
  588.   {$EXTERNALSYM _DOC_INFO_1A}
  589.   _DOC_INFO_1A = record
  590.     pDocName: PAnsiChar;
  591.     pOutputFile: PAnsiChar;
  592.     pDatatype: PAnsiChar;
  593.   end;
  594.   {$EXTERNALSYM _DOC_INFO_1W}
  595.   _DOC_INFO_1W = record
  596.     pDocName: PWideChar;
  597.     pOutputFile: PWideChar;
  598.     pDatatype: PWideChar;
  599.   end;
  600.   {$EXTERNALSYM _DOC_INFO_1}
  601.   _DOC_INFO_1 = _DOC_INFO_1A;
  602.   TDocInfo1A = _DOC_INFO_1A;
  603.   TDocInfo1W = _DOC_INFO_1W;
  604.   TDocInfo1 = TDocInfo1A;
  605.   {$EXTERNALSYM DOC_INFO_1A}
  606.   DOC_INFO_1A = _DOC_INFO_1A;
  607.   {$EXTERNALSYM DOC_INFO_1W}
  608.   DOC_INFO_1W = _DOC_INFO_1W;
  609.   {$EXTERNALSYM DOC_INFO_1}
  610.   DOC_INFO_1 = DOC_INFO_1A;
  611.  
  612.   PFormInfo1A = ^TFormInfo1A;
  613.   PFormInfo1W = ^TFormInfo1W;
  614.   PFormInfo1 = PFormInfo1A;
  615.   {$EXTERNALSYM _FORM_INFO_1A}
  616.   _FORM_INFO_1A = record
  617.     Flags: DWORD;
  618.     pName: PAnsiChar;
  619.     Size: TSize;
  620.     ImageableArea: TRect;
  621.   end;
  622.   {$EXTERNALSYM _FORM_INFO_1W}
  623.   _FORM_INFO_1W = record
  624.     Flags: DWORD;
  625.     pName: PWideChar;
  626.     Size: TSize;
  627.     ImageableArea: TRect;
  628.   end;
  629.   {$EXTERNALSYM _FORM_INFO_1}
  630.   _FORM_INFO_1 = _FORM_INFO_1A;
  631.   TFormInfo1A = _FORM_INFO_1A;
  632.   TFormInfo1W = _FORM_INFO_1W;
  633.   TFormInfo1 = TFormInfo1A;
  634.   {$EXTERNALSYM FORM_INFO_1A}
  635.   FORM_INFO_1A = _FORM_INFO_1A;
  636.   {$EXTERNALSYM FORM_INFO_1W}
  637.   FORM_INFO_1W = _FORM_INFO_1W;
  638.   {$EXTERNALSYM FORM_INFO_1}
  639.   FORM_INFO_1 = FORM_INFO_1A;
  640.  
  641.   PDocInfo2A = ^TDocInfo2A;
  642.   PDocInfo2W = ^TDocInfo2W;
  643.   PDocInfo2 = PDocInfo2A;
  644.   {$EXTERNALSYM _DOC_INFO_2A}
  645.   _DOC_INFO_2A = record
  646.     pDocName: PAnsiChar;
  647.     pOutputFile: PAnsiChar;
  648.     pDatatype: PAnsiChar;
  649.     dwMode: DWORD;
  650.     JobId: DWORD;
  651.   end;
  652.   {$EXTERNALSYM _DOC_INFO_2W}
  653.   _DOC_INFO_2W = record
  654.     pDocName: PWideChar;
  655.     pOutputFile: PWideChar;
  656.     pDatatype: PWideChar;
  657.     dwMode: DWORD;
  658.     JobId: DWORD;
  659.   end;
  660.   {$EXTERNALSYM _DOC_INFO_2}
  661.   _DOC_INFO_2 = _DOC_INFO_2A;
  662.   TDocInfo2A = _DOC_INFO_2A;
  663.   TDocInfo2W = _DOC_INFO_2W;
  664.   TDocInfo2 = TDocInfo2A;
  665.   {$EXTERNALSYM DOC_INFO_2A}
  666.   DOC_INFO_2A = _DOC_INFO_2A;
  667.   {$EXTERNALSYM DOC_INFO_2W}
  668.   DOC_INFO_2W = _DOC_INFO_2W;
  669.   {$EXTERNALSYM DOC_INFO_2}
  670.   DOC_INFO_2 = DOC_INFO_2A;
  671.  
  672. const
  673.   {$EXTERNALSYM DI_CHANNEL}
  674.   DI_CHANNEL              = 1;    { start direct read/write channel, }
  675.   {$EXTERNALSYM DI_READ_SPOOL_JOB}
  676.   DI_READ_SPOOL_JOB       = 3;
  677.  
  678.   {$EXTERNALSYM FORM_USER}
  679.   FORM_USER           = $00000000;
  680.   {$EXTERNALSYM FORM_BUILTIN}
  681.   FORM_BUILTIN        = $00000001;
  682.   {$EXTERNALSYM FORM_PRINTER}
  683.   FORM_PRINTER        = $00000002;
  684.  
  685. type
  686.   PPrintProcessorInfo1A = ^TPrintProcessorInfo1A;
  687.   PPrintProcessorInfo1W = ^TPrintProcessorInfo1W;
  688.   PPrintProcessorInfo1 = PPrintProcessorInfo1A;
  689.   {$EXTERNALSYM _PRINTPROCESSOR_INFO_1A}
  690.   _PRINTPROCESSOR_INFO_1A = record
  691.     pName: PAnsiChar;
  692.   end;
  693.   {$EXTERNALSYM _PRINTPROCESSOR_INFO_1W}
  694.   _PRINTPROCESSOR_INFO_1W = record
  695.     pName: PWideChar;
  696.   end;
  697.   {$EXTERNALSYM _PRINTPROCESSOR_INFO_1}
  698.   _PRINTPROCESSOR_INFO_1 = _PRINTPROCESSOR_INFO_1A;
  699.   TPrintProcessorInfo1A = _PRINTPROCESSOR_INFO_1A;
  700.   TPrintProcessorInfo1W = _PRINTPROCESSOR_INFO_1W;
  701.   TPrintProcessorInfo1 = TPrintProcessorInfo1A;
  702.   {$EXTERNALSYM PRINTPROCESSOR_INFO_1A}
  703.   PRINTPROCESSOR_INFO_1A = _PRINTPROCESSOR_INFO_1A;
  704.   {$EXTERNALSYM PRINTPROCESSOR_INFO_1W}
  705.   PRINTPROCESSOR_INFO_1W = _PRINTPROCESSOR_INFO_1W;
  706.   {$EXTERNALSYM PRINTPROCESSOR_INFO_1}
  707.   PRINTPROCESSOR_INFO_1 = PRINTPROCESSOR_INFO_1A;
  708.  
  709.   PPortInfo1A = ^TPortInfo1A;
  710.   PPortInfo1W = ^TPortInfo1W;
  711.   PPortInfo1 = PPortInfo1A;
  712.   {$EXTERNALSYM _PORT_INFO_1A}
  713.   _PORT_INFO_1A = record
  714.     pName: PAnsiChar;
  715.   end;
  716.   {$EXTERNALSYM _PORT_INFO_1W}
  717.   _PORT_INFO_1W = record
  718.     pName: PWideChar;
  719.   end;
  720.   {$EXTERNALSYM _PORT_INFO_1}
  721.   _PORT_INFO_1 = _PORT_INFO_1A;
  722.   TPortInfo1A = _PORT_INFO_1A;
  723.   TPortInfo1W = _PORT_INFO_1W;
  724.   TPortInfo1 = TPortInfo1A;
  725.   {$EXTERNALSYM PORT_INFO_1A}
  726.   PORT_INFO_1A = _PORT_INFO_1A;
  727.   {$EXTERNALSYM PORT_INFO_1W}
  728.   PORT_INFO_1W = _PORT_INFO_1W;
  729.   {$EXTERNALSYM PORT_INFO_1}
  730.   PORT_INFO_1 = PORT_INFO_1A;
  731.  
  732.   PPortInfo2A = ^TPortInfo2A;
  733.   PPortInfo2W = ^TPortInfo2W;
  734.   PPortInfo2 = PPortInfo2A;
  735.   {$EXTERNALSYM _PORT_INFO_2A}
  736.   _PORT_INFO_2A = record
  737.     pPortName: PAnsiChar;
  738.     pMonitorName: PAnsiChar;
  739.     pDescription: PAnsiChar;
  740.     fPortType: DWORD;
  741.     Reserved: DWORD;
  742.   end;
  743.   {$EXTERNALSYM _PORT_INFO_2W}
  744.   _PORT_INFO_2W = record
  745.     pPortName: PWideChar;
  746.     pMonitorName: PWideChar;
  747.     pDescription: PWideChar;
  748.     fPortType: DWORD;
  749.     Reserved: DWORD;
  750.   end;
  751.   {$EXTERNALSYM _PORT_INFO_2}
  752.   _PORT_INFO_2 = _PORT_INFO_2A;
  753.   TPortInfo2A = _PORT_INFO_2A;
  754.   TPortInfo2W = _PORT_INFO_2W;
  755.   TPortInfo2 = TPortInfo2A;
  756.   {$EXTERNALSYM PORT_INFO_2A}
  757.   PORT_INFO_2A = _PORT_INFO_2A;
  758.   {$EXTERNALSYM PORT_INFO_2W}
  759.   PORT_INFO_2W = _PORT_INFO_2W;
  760.   {$EXTERNALSYM PORT_INFO_2}
  761.   PORT_INFO_2 = PORT_INFO_2A;
  762.  
  763. const
  764.   {$EXTERNALSYM PORT_TYPE_WRITE}
  765.   PORT_TYPE_WRITE         = $0001;
  766.   {$EXTERNALSYM PORT_TYPE_READ}
  767.   PORT_TYPE_READ          = $0002;
  768.   {$EXTERNALSYM PORT_TYPE_REDIRECTED}
  769.   PORT_TYPE_REDIRECTED    = $0004;
  770.   {$EXTERNALSYM PORT_TYPE_NET_ATTACHED}
  771.   PORT_TYPE_NET_ATTACHED  = $0008;
  772.  
  773. type
  774.   PPortInfo3A = ^TPortInfo3A;
  775.   PPortInfo3W = ^TPortInfo3W;
  776.   PPortInfo3 = PPortInfo3A;
  777.   {$EXTERNALSYM _PORT_INFO_3A}
  778.   _PORT_INFO_3A = record
  779.     dwStatus: DWORD;
  780.     pszStatus: PAnsiChar;
  781.     dwSeverity: DWORD;
  782.   end;
  783.   {$EXTERNALSYM _PORT_INFO_3W}
  784.   _PORT_INFO_3W = record
  785.     dwStatus: DWORD;
  786.     pszStatus: PWideChar;
  787.     dwSeverity: DWORD;
  788.   end;
  789.   {$EXTERNALSYM _PORT_INFO_3}
  790.   _PORT_INFO_3 = _PORT_INFO_3A;
  791.   TPortInfo3A = _PORT_INFO_3A;
  792.   TPortInfo3W = _PORT_INFO_3W;
  793.   TPortInfo3 = TPortInfo3A;
  794.   {$EXTERNALSYM PORT_INFO_3A}
  795.   PORT_INFO_3A = _PORT_INFO_3A;
  796.   {$EXTERNALSYM PORT_INFO_3W}
  797.   PORT_INFO_3W = _PORT_INFO_3W;
  798.   {$EXTERNALSYM PORT_INFO_3}
  799.   PORT_INFO_3 = PORT_INFO_3A;
  800.  
  801. const
  802.   {$EXTERNALSYM PORT_STATUS_TYPE_ERROR}
  803.   PORT_STATUS_TYPE_ERROR          = 1;
  804.   {$EXTERNALSYM PORT_STATUS_TYPE_WARNING}
  805.   PORT_STATUS_TYPE_WARNING        = 2;
  806.   {$EXTERNALSYM PORT_STATUS_TYPE_INFO}
  807.   PORT_STATUS_TYPE_INFO           = 3;
  808.  
  809.   {$EXTERNALSYM PORT_STATUS_OFFLINE}
  810.   PORT_STATUS_OFFLINE             = 1;
  811.   {$EXTERNALSYM PORT_STATUS_PAPER_JAM}
  812.   PORT_STATUS_PAPER_JAM           = 2;
  813.   {$EXTERNALSYM PORT_STATUS_PAPER_OUT}
  814.   PORT_STATUS_PAPER_OUT           = 3;
  815.   {$EXTERNALSYM PORT_STATUS_OUTPUT_BIN_FULL}
  816.   PORT_STATUS_OUTPUT_BIN_FULL     = 4;
  817.   {$EXTERNALSYM PORT_STATUS_PAPER_PROBLEM}
  818.   PORT_STATUS_PAPER_PROBLEM       = 5;
  819.   {$EXTERNALSYM PORT_STATUS_NO_TONER}
  820.   PORT_STATUS_NO_TONER            = 6;
  821.   {$EXTERNALSYM PORT_STATUS_DOOR_OPEN}
  822.   PORT_STATUS_DOOR_OPEN           = 7;
  823.   {$EXTERNALSYM PORT_STATUS_USER_INTERVENTION}
  824.   PORT_STATUS_USER_INTERVENTION   = 8;
  825.   {$EXTERNALSYM PORT_STATUS_OUT_OF_MEMORY}
  826.   PORT_STATUS_OUT_OF_MEMORY       = 9;
  827.  
  828.   {$EXTERNALSYM PORT_STATUS_TONER_LOW}
  829.   PORT_STATUS_TONER_LOW           = 10;
  830.  
  831.   {$EXTERNALSYM PORT_STATUS_WARMING_UP}
  832.   PORT_STATUS_WARMING_UP          = 11;
  833.   {$EXTERNALSYM PORT_STATUS_POWER_SAVE}
  834.   PORT_STATUS_POWER_SAVE          = 12;
  835.  
  836. type
  837.   PMonitorInfo1A = ^TMonitorInfo1A;
  838.   PMonitorInfo1W = ^TMonitorInfo1W;
  839.   PMonitorInfo1 = PMonitorInfo1A;
  840.   {$EXTERNALSYM _MONITOR_INFO_1A}
  841.   _MONITOR_INFO_1A = record
  842.     pName: PAnsiChar;
  843.   end;
  844.   {$EXTERNALSYM _MONITOR_INFO_1W}
  845.   _MONITOR_INFO_1W = record
  846.     pName: PWideChar;
  847.   end;
  848.   {$EXTERNALSYM _MONITOR_INFO_1}
  849.   _MONITOR_INFO_1 = _MONITOR_INFO_1A;
  850.   TMonitorInfo1A = _MONITOR_INFO_1A;
  851.   TMonitorInfo1W = _MONITOR_INFO_1W;
  852.   TMonitorInfo1 = TMonitorInfo1A;
  853.   {$EXTERNALSYM MONITOR_INFO_1A}
  854.   MONITOR_INFO_1A = _MONITOR_INFO_1A;
  855.   {$EXTERNALSYM MONITOR_INFO_1W}
  856.   MONITOR_INFO_1W = _MONITOR_INFO_1W;
  857.   {$EXTERNALSYM MONITOR_INFO_1}
  858.   MONITOR_INFO_1 = MONITOR_INFO_1A;
  859.  
  860.   PMonitorInfo2A = ^TMonitorInfo2A;
  861.   PMonitorInfo2W = ^TMonitorInfo2W;
  862.   PMonitorInfo2 = PMonitorInfo2A;
  863.   {$EXTERNALSYM _MONITOR_INFO_2A}
  864.   _MONITOR_INFO_2A = record
  865.     pName: PAnsiChar;
  866.     pEnvironment: PAnsiChar;
  867.     pDLLName: PAnsiChar;
  868.   end;
  869.   {$EXTERNALSYM _MONITOR_INFO_2W}
  870.   _MONITOR_INFO_2W = record
  871.     pName: PWideChar;
  872.     pEnvironment: PWideChar;
  873.     pDLLName: PWideChar;
  874.   end;
  875.   {$EXTERNALSYM _MONITOR_INFO_2}
  876.   _MONITOR_INFO_2 = _MONITOR_INFO_2A;
  877.   TMonitorInfo2A = _MONITOR_INFO_2A;
  878.   TMonitorInfo2W = _MONITOR_INFO_2W;
  879.   TMonitorInfo2 = TMonitorInfo2A;
  880.   {$EXTERNALSYM MONITOR_INFO_2A}
  881.   MONITOR_INFO_2A = _MONITOR_INFO_2A;
  882.   {$EXTERNALSYM MONITOR_INFO_2W}
  883.   MONITOR_INFO_2W = _MONITOR_INFO_2W;
  884.   {$EXTERNALSYM MONITOR_INFO_2}
  885.   MONITOR_INFO_2 = MONITOR_INFO_2A;
  886.  
  887.   PDatatypesInfo1A = ^TDatatypesInfo1A;
  888.   PDatatypesInfo1W = ^TDatatypesInfo1W;
  889.   PDatatypesInfo1 = PDatatypesInfo1A;
  890.   {$EXTERNALSYM _DATATYPES_INFO_1A}
  891.   _DATATYPES_INFO_1A = record
  892.     pName: PAnsiChar;
  893.   end;
  894.   {$EXTERNALSYM _DATATYPES_INFO_1W}
  895.   _DATATYPES_INFO_1W = record
  896.     pName: PWideChar;
  897.   end;
  898.   {$EXTERNALSYM _DATATYPES_INFO_1}
  899.   _DATATYPES_INFO_1 = _DATATYPES_INFO_1A;
  900.   TDatatypesInfo1A = _DATATYPES_INFO_1A;
  901.   TDatatypesInfo1W = _DATATYPES_INFO_1W;
  902.   TDatatypesInfo1 = TDatatypesInfo1A;
  903.   {$EXTERNALSYM DATATYPES_INFO_1A}
  904.   DATATYPES_INFO_1A = _DATATYPES_INFO_1A;
  905.   {$EXTERNALSYM DATATYPES_INFO_1W}
  906.   DATATYPES_INFO_1W = _DATATYPES_INFO_1W;
  907.   {$EXTERNALSYM DATATYPES_INFO_1}
  908.   DATATYPES_INFO_1 = DATATYPES_INFO_1A;
  909.  
  910.   PPrinterDefaultsA = ^TPrinterDefaultsA;
  911.   PPrinterDefaultsW = ^TPrinterDefaultsW;
  912.   PPrinterDefaults = PPrinterDefaultsA;
  913.   {$EXTERNALSYM _PRINTER_DEFAULTSA}
  914.   _PRINTER_DEFAULTSA = record
  915.     pDatatype: PAnsiChar;
  916.     pDevMode: PDeviceModeA;
  917.     DesiredAccess: ACCESS_MASK;
  918.   end;
  919.   {$EXTERNALSYM _PRINTER_DEFAULTSW}
  920.   _PRINTER_DEFAULTSW = record
  921.     pDatatype: PWideChar;
  922.     pDevMode: PDeviceModeW;
  923.     DesiredAccess: ACCESS_MASK;
  924.   end;
  925.   {$EXTERNALSYM _PRINTER_DEFAULTS}
  926.   _PRINTER_DEFAULTS = _PRINTER_DEFAULTSA;
  927.   TPrinterDefaultsA = _PRINTER_DEFAULTSA;
  928.   TPrinterDefaultsW = _PRINTER_DEFAULTSW;
  929.   TPrinterDefaults = TPrinterDefaultsA;
  930.   {$EXTERNALSYM PRINTER_DEFAULTSA}
  931.   PRINTER_DEFAULTSA = _PRINTER_DEFAULTSA;
  932.   {$EXTERNALSYM PRINTER_DEFAULTSW}
  933.   PRINTER_DEFAULTSW = _PRINTER_DEFAULTSW;
  934.   {$EXTERNALSYM PRINTER_DEFAULTS}
  935.   PRINTER_DEFAULTS = PRINTER_DEFAULTSA;
  936.  
  937. {$EXTERNALSYM EnumPrintersA}
  938. function EnumPrintersA(Flags: DWORD; Name: PAnsiChar; Level: DWORD;
  939.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  940. {$EXTERNALSYM EnumPrintersW}
  941. function EnumPrintersW(Flags: DWORD; Name: PWideChar; Level: DWORD;
  942.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  943. {$EXTERNALSYM EnumPrinters}
  944. function EnumPrinters(Flags: DWORD; Name: PChar; Level: DWORD;
  945.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  946.  
  947. const
  948.   {$EXTERNALSYM PRINTER_ENUM_DEFAULT}
  949.   PRINTER_ENUM_DEFAULT     = $00000001;
  950.   {$EXTERNALSYM PRINTER_ENUM_LOCAL}
  951.   PRINTER_ENUM_LOCAL       = $00000002;
  952.   {$EXTERNALSYM PRINTER_ENUM_CONNECTIONS}
  953.   PRINTER_ENUM_CONNECTIONS = $00000004;
  954.   {$EXTERNALSYM PRINTER_ENUM_FAVORITE}
  955.   PRINTER_ENUM_FAVORITE    = $00000004;
  956.   {$EXTERNALSYM PRINTER_ENUM_NAME}
  957.   PRINTER_ENUM_NAME        = $00000008;
  958.   {$EXTERNALSYM PRINTER_ENUM_REMOTE}
  959.   PRINTER_ENUM_REMOTE      = $00000010;
  960.   {$EXTERNALSYM PRINTER_ENUM_SHARED}
  961.   PRINTER_ENUM_SHARED      = $00000020;
  962.   {$EXTERNALSYM PRINTER_ENUM_NETWORK}
  963.   PRINTER_ENUM_NETWORK     = $00000040;
  964.  
  965.   {$EXTERNALSYM PRINTER_ENUM_EXPAND}
  966.   PRINTER_ENUM_EXPAND      = $00004000;
  967.   {$EXTERNALSYM PRINTER_ENUM_CONTAINER}
  968.   PRINTER_ENUM_CONTAINER   = $00008000;
  969.  
  970.   {$EXTERNALSYM PRINTER_ENUM_ICONMASK}
  971.   PRINTER_ENUM_ICONMASK    = $00ff0000;
  972.   {$EXTERNALSYM PRINTER_ENUM_ICON1}
  973.   PRINTER_ENUM_ICON1       = $00010000;
  974.   {$EXTERNALSYM PRINTER_ENUM_ICON2}
  975.   PRINTER_ENUM_ICON2       = $00020000;
  976.   {$EXTERNALSYM PRINTER_ENUM_ICON3}
  977.   PRINTER_ENUM_ICON3       = $00040000;
  978.   {$EXTERNALSYM PRINTER_ENUM_ICON4}
  979.   PRINTER_ENUM_ICON4       = $00080000;
  980.   {$EXTERNALSYM PRINTER_ENUM_ICON5}
  981.   PRINTER_ENUM_ICON5       = $00100000;
  982.   {$EXTERNALSYM PRINTER_ENUM_ICON6}
  983.   PRINTER_ENUM_ICON6       = $00200000;
  984.   {$EXTERNALSYM PRINTER_ENUM_ICON7}
  985.   PRINTER_ENUM_ICON7       = $00400000;
  986.   {$EXTERNALSYM PRINTER_ENUM_ICON8}
  987.   PRINTER_ENUM_ICON8       = $00800000;
  988.  
  989. {$EXTERNALSYM OpenPrinterA}
  990. function OpenPrinterA(pPrinterName: PAnsiChar; var phPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
  991. {$EXTERNALSYM OpenPrinterW}
  992. function OpenPrinterW(pPrinterName: PWideChar; var phPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
  993. {$EXTERNALSYM OpenPrinter}
  994. function OpenPrinter(pPrinterName: PChar; var phPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
  995. {$EXTERNALSYM ResetPrinterA}
  996. function ResetPrinterA(hPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
  997. {$EXTERNALSYM ResetPrinterW}
  998. function ResetPrinterW(hPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
  999. {$EXTERNALSYM ResetPrinter}
  1000. function ResetPrinter(hPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
  1001. {$EXTERNALSYM SetJobA}
  1002. function SetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  1003. {$EXTERNALSYM SetJobW}
  1004. function SetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  1005. {$EXTERNALSYM SetJob}
  1006. function SetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  1007. {$EXTERNALSYM GetJobA}
  1008. function GetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1009. {$EXTERNALSYM GetJobW}
  1010. function GetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1011. {$EXTERNALSYM GetJob}
  1012. function GetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1013. {$EXTERNALSYM EnumJobsA}
  1014. function EnumJobsA(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  1015.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1016. {$EXTERNALSYM EnumJobsW}
  1017. function EnumJobsW(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  1018.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1019. {$EXTERNALSYM EnumJobs}
  1020. function EnumJobs(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  1021.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1022. {$EXTERNALSYM AddPrinterA}
  1023. function AddPrinterA(pName: PAnsiChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  1024. {$EXTERNALSYM AddPrinterW}
  1025. function AddPrinterW(pName: PWideChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  1026. {$EXTERNALSYM AddPrinter}
  1027. function AddPrinter(pName: PChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  1028. {$EXTERNALSYM DeletePrinter}
  1029. function DeletePrinter(hPrinter: THandle): BOOL; stdcall;
  1030. {$EXTERNALSYM SetPrinterA}
  1031. function SetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  1032. {$EXTERNALSYM SetPrinterW}
  1033. function SetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  1034. {$EXTERNALSYM SetPrinter}
  1035. function SetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  1036. {$EXTERNALSYM GetPrinterA}
  1037. function GetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1038. {$EXTERNALSYM GetPrinterW}
  1039. function GetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1040. {$EXTERNALSYM GetPrinter}
  1041. function GetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1042. {$EXTERNALSYM AddPrinterDriverA}
  1043. function AddPrinterDriverA(pName: PAnsiChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  1044. {$EXTERNALSYM AddPrinterDriverW}
  1045. function AddPrinterDriverW(pName: PWideChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  1046. {$EXTERNALSYM AddPrinterDriver}
  1047. function AddPrinterDriver(pName: PChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  1048. {$EXTERNALSYM EnumPrinterDriversA}
  1049. function EnumPrinterDriversA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  1050.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1051. {$EXTERNALSYM EnumPrinterDriversW}
  1052. function EnumPrinterDriversW(pName, pEnvironment: PWideChar; Level: DWORD;
  1053.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1054. {$EXTERNALSYM EnumPrinterDrivers}
  1055. function EnumPrinterDrivers(pName, pEnvironment: PChar; Level: DWORD;
  1056.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1057. {$EXTERNALSYM GetPrinterDriverA}
  1058. function GetPrinterDriverA(hPrinter: THandle; pEnvironment: PAnsiChar; Level: DWORD;
  1059.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1060. {$EXTERNALSYM GetPrinterDriverW}
  1061. function GetPrinterDriverW(hPrinter: THandle; pEnvironment: PWideChar; Level: DWORD;
  1062.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1063. {$EXTERNALSYM GetPrinterDriver}
  1064. function GetPrinterDriver(hPrinter: THandle; pEnvironment: PChar; Level: DWORD;
  1065.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1066. {$EXTERNALSYM GetPrinterDriverDirectoryA}
  1067. function GetPrinterDriverDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  1068.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1069. {$EXTERNALSYM GetPrinterDriverDirectoryW}
  1070. function GetPrinterDriverDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
  1071.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1072. {$EXTERNALSYM GetPrinterDriverDirectory}
  1073. function GetPrinterDriverDirectory(pName, pEnvironment: PChar; Level: DWORD;
  1074.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1075. {$EXTERNALSYM DeletePrinterDriverA}
  1076. function DeletePrinterDriverA(pName, pEnvironment, pDriverName: PAnsiChar): BOOL; stdcall;
  1077. {$EXTERNALSYM DeletePrinterDriverW}
  1078. function DeletePrinterDriverW(pName, pEnvironment, pDriverName: PWideChar): BOOL; stdcall;
  1079. {$EXTERNALSYM DeletePrinterDriver}
  1080. function DeletePrinterDriver(pName, pEnvironment, pDriverName: PChar): BOOL; stdcall;
  1081. {$EXTERNALSYM AddPrintProcessorA}
  1082. function AddPrintProcessorA(pName, pEnvironment, pPathName, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
  1083. {$EXTERNALSYM AddPrintProcessorW}
  1084. function AddPrintProcessorW(pName, pEnvironment, pPathName, pPrintProcessorName: PWideChar): BOOL; stdcall;
  1085. {$EXTERNALSYM AddPrintProcessor}
  1086. function AddPrintProcessor(pName, pEnvironment, pPathName, pPrintProcessorName: PChar): BOOL; stdcall;
  1087. {$EXTERNALSYM EnumPrintProcessorsA}
  1088. function EnumPrintProcessorsA(pName, pEnvironment: PAnsiChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  1089.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1090. {$EXTERNALSYM EnumPrintProcessorsW}
  1091. function EnumPrintProcessorsW(pName, pEnvironment: PWideChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  1092.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1093. {$EXTERNALSYM EnumPrintProcessors}
  1094. function EnumPrintProcessors(pName, pEnvironment: PChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  1095.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1096. {$EXTERNALSYM GetPrintProcessorDirectoryA}
  1097. function GetPrintProcessorDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  1098.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1099. {$EXTERNALSYM GetPrintProcessorDirectoryW}
  1100. function GetPrintProcessorDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
  1101.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1102. {$EXTERNALSYM GetPrintProcessorDirectory}
  1103. function GetPrintProcessorDirectory(pName, pEnvironment: PChar; Level: DWORD;
  1104.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1105. {$EXTERNALSYM EnumPrintProcessorDatatypesA}
  1106. function EnumPrintProcessorDatatypesA(pName, pPrintProcessorName: PAnsiChar; Level: DWORD;
  1107.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1108. {$EXTERNALSYM EnumPrintProcessorDatatypesW}
  1109. function EnumPrintProcessorDatatypesW(pName, pPrintProcessorName: PWideChar; Level: DWORD;
  1110.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1111. {$EXTERNALSYM EnumPrintProcessorDatatypes}
  1112. function EnumPrintProcessorDatatypes(pName, pPrintProcessorName: PChar; Level: DWORD;
  1113.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1114. {$EXTERNALSYM DeletePrintProcessorA}
  1115. function DeletePrintProcessorA(pName, pEnvironment, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
  1116. {$EXTERNALSYM DeletePrintProcessorW}
  1117. function DeletePrintProcessorW(pName, pEnvironment, pPrintProcessorName: PWideChar): BOOL; stdcall;
  1118. {$EXTERNALSYM DeletePrintProcessor}
  1119. function DeletePrintProcessor(pName, pEnvironment, pPrintProcessorName: PChar): BOOL; stdcall;
  1120. {$EXTERNALSYM StartDocPrinterA}
  1121. function StartDocPrinterA(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  1122. {$EXTERNALSYM StartDocPrinterW}
  1123. function StartDocPrinterW(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  1124. {$EXTERNALSYM StartDocPrinter}
  1125. function StartDocPrinter(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  1126. {$EXTERNALSYM StartPagePrinter}
  1127. function StartPagePrinter(hPrinter: THandle): BOOL; stdcall;
  1128. {$EXTERNALSYM WritePrinter}
  1129. function WritePrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pcWritten: DWORD): BOOL; stdcall;
  1130. {$EXTERNALSYM EndPagePrinter}
  1131. function EndPagePrinter(hPrinter: THandle): BOOL; stdcall;
  1132. {$EXTERNALSYM AbortPrinter}
  1133. function AbortPrinter(hPrinter: THandle): BOOL; stdcall;
  1134. {$EXTERNALSYM ReadPrinter}
  1135. function ReadPrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pNoBytesRead: DWORD): BOOL; stdcall;
  1136. {$EXTERNALSYM EndDocPrinter}
  1137. function EndDocPrinter(hPrinter: THandle): BOOL; stdcall;
  1138. {$EXTERNALSYM AddJobA}
  1139. function AddJobA(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1140. {$EXTERNALSYM AddJobW}
  1141. function AddJobW(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1142. {$EXTERNALSYM AddJob}
  1143. function AddJob(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1144. {$EXTERNALSYM ScheduleJob}
  1145. function ScheduleJob(hPrinter: THandle; JobId: DWORD): BOOL; stdcall;
  1146. {$EXTERNALSYM PrinterProperties}
  1147. function PrinterProperties(hWnd: HWND; hPrinter: THandle): BOOL; stdcall;
  1148. {$EXTERNALSYM DocumentPropertiesA}
  1149. function DocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
  1150.   const pDevModeOutput: TDeviceModeA; var pDevModeInput: TDeviceModeA;
  1151.   fMode: DWORD): Longint; stdcall;
  1152. {$EXTERNALSYM DocumentPropertiesW}
  1153. function DocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
  1154.   const pDevModeOutput: TDeviceModeW; var pDevModeInput: TDeviceModeW;
  1155.   fMode: DWORD): Longint; stdcall;
  1156. {$EXTERNALSYM DocumentProperties}
  1157. function DocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
  1158.   const pDevModeOutput: TDeviceMode; var pDevModeInput: TDeviceMode;
  1159.   fMode: DWORD): Longint; stdcall;
  1160. {$EXTERNALSYM AdvancedDocumentPropertiesA}
  1161. function AdvancedDocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
  1162.   pDevModeOutput, pDevModeInput: PDeviceModeA): Longint; stdcall;
  1163. {$EXTERNALSYM AdvancedDocumentPropertiesW}
  1164. function AdvancedDocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
  1165.   pDevModeOutput, pDevModeInput: PDeviceModeW): Longint; stdcall;
  1166. {$EXTERNALSYM AdvancedDocumentProperties}
  1167. function AdvancedDocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
  1168.   pDevModeOutput, pDevModeInput: PDeviceMode): Longint; stdcall;
  1169. {$EXTERNALSYM GetPrinterDataA}
  1170. function GetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; pType: PDWORD; pData: Pointer;
  1171.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  1172. {$EXTERNALSYM GetPrinterDataW}
  1173. function GetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; pType: PDWORD; pData: Pointer;
  1174.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  1175. {$EXTERNALSYM GetPrinterData}
  1176. function GetPrinterData(hPrinter: THandle; pValueName: PChar; pType: PDWORD; pData: Pointer;
  1177.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  1178. function EnumPrinterDataA(hPrinter: THandle; dwIndex: DWORD; pValueName: PAnsiChar;
  1179.   cbValueName: DWORD; var pcbValueName, pType: DWORD; pData: PByte;
  1180.   cbData: DWORD; pcbData: PDWORD): DWORD; stdcall;
  1181. function EnumPrinterDataW(hPrinter: THandle; dwIndex: DWORD; pValueName: PWideChar;
  1182.   cbValueName: DWORD; var pcbValueName, pType: DWORD; pData: PByte;
  1183.   cbData: DWORD; pcbData: PDWORD): DWORD; stdcall;
  1184. function EnumPrinterData(hPrinter: THandle; dwIndex: DWORD; pValueName: PChar;
  1185.   cbValueName: DWORD; var pcbValueName, pType: DWORD; pData: PByte;
  1186.   cbData: DWORD; pcbData: PDWORD): DWORD; stdcall;
  1187. {$EXTERNALSYM SetPrinterDataA}
  1188. function SetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  1189. {$EXTERNALSYM SetPrinterDataW}
  1190. function SetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  1191. {$EXTERNALSYM SetPrinterData}
  1192. function SetPrinterData(hPrinter: THandle; pValueName: PChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  1193. function DeletePrinterDataA(hPrinter: THandle; pValueName: PAnsiChar): DWORD; stdcall;
  1194. function DeletePrinterDataW(hPrinter: THandle; pValueName: PWideChar): DWORD; stdcall;
  1195. function DeletePrinterData(hPrinter: THandle; pValueName: PChar): DWORD; stdcall;
  1196.  
  1197. const
  1198.   {$EXTERNALSYM PRINTER_NOTIFY_TYPE}
  1199.   PRINTER_NOTIFY_TYPE = $00;
  1200.   {$EXTERNALSYM JOB_NOTIFY_TYPE}
  1201.   JOB_NOTIFY_TYPE     = $01;
  1202.  
  1203.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SERVER_NAME}
  1204.   PRINTER_NOTIFY_FIELD_SERVER_NAME             = $00;
  1205.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PRINTER_NAME}
  1206.   PRINTER_NOTIFY_FIELD_PRINTER_NAME            = $01;
  1207.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SHARE_NAME}
  1208.   PRINTER_NOTIFY_FIELD_SHARE_NAME              = $02;
  1209.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PORT_NAME}
  1210.   PRINTER_NOTIFY_FIELD_PORT_NAME               = $03;
  1211.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DRIVER_NAME}
  1212.   PRINTER_NOTIFY_FIELD_DRIVER_NAME             = $04;
  1213.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_COMMENT}
  1214.   PRINTER_NOTIFY_FIELD_COMMENT                 = $05;
  1215.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_LOCATION}
  1216.   PRINTER_NOTIFY_FIELD_LOCATION                = $06;
  1217.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DEVMODE}
  1218.   PRINTER_NOTIFY_FIELD_DEVMODE                 = $07;
  1219.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SEPFILE}
  1220.   PRINTER_NOTIFY_FIELD_SEPFILE                 = $08;
  1221.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR}
  1222.   PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR         = $09;
  1223.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PARAMETERS}
  1224.   PRINTER_NOTIFY_FIELD_PARAMETERS              = $0A;
  1225.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DATATYPE}
  1226.   PRINTER_NOTIFY_FIELD_DATATYPE                = $0B;
  1227.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR}
  1228.   PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR     = $0C;
  1229.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_ATTRIBUTES}
  1230.   PRINTER_NOTIFY_FIELD_ATTRIBUTES              = $0D;
  1231.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PRIORITY}
  1232.   PRINTER_NOTIFY_FIELD_PRIORITY                = $0E;
  1233.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY}
  1234.   PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY        = $0F;
  1235.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_START_TIME}
  1236.   PRINTER_NOTIFY_FIELD_START_TIME              = $10;
  1237.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_UNTIL_TIME}
  1238.   PRINTER_NOTIFY_FIELD_UNTIL_TIME              = $11;
  1239.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_STATUS}
  1240.   PRINTER_NOTIFY_FIELD_STATUS                  = $12;
  1241.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_STATUS_STRING}
  1242.   PRINTER_NOTIFY_FIELD_STATUS_STRING           = $13;
  1243.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_CJOBS}
  1244.   PRINTER_NOTIFY_FIELD_CJOBS                   = $14;
  1245.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_AVERAGE_PPM}
  1246.   PRINTER_NOTIFY_FIELD_AVERAGE_PPM             = $15;
  1247.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_TOTAL_PAGES}
  1248.   PRINTER_NOTIFY_FIELD_TOTAL_PAGES             = $16;
  1249.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PAGES_PRINTED}
  1250.   PRINTER_NOTIFY_FIELD_PAGES_PRINTED           = $17;
  1251.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_TOTAL_BYTES}
  1252.   PRINTER_NOTIFY_FIELD_TOTAL_BYTES             = $18;
  1253.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_BYTES_PRINTED}
  1254.   PRINTER_NOTIFY_FIELD_BYTES_PRINTED           = $19;
  1255.  
  1256.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PRINTER_NAME}
  1257.   JOB_NOTIFY_FIELD_PRINTER_NAME                = $00;
  1258.   {$EXTERNALSYM JOB_NOTIFY_FIELD_MACHINE_NAME}
  1259.   JOB_NOTIFY_FIELD_MACHINE_NAME                = $01;
  1260.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PORT_NAME}
  1261.   JOB_NOTIFY_FIELD_PORT_NAME                   = $02;
  1262.   {$EXTERNALSYM JOB_NOTIFY_FIELD_USER_NAME}
  1263.   JOB_NOTIFY_FIELD_USER_NAME                   = $03;
  1264.   {$EXTERNALSYM JOB_NOTIFY_FIELD_NOTIFY_NAME}
  1265.   JOB_NOTIFY_FIELD_NOTIFY_NAME                 = $04;
  1266.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DATATYPE}
  1267.   JOB_NOTIFY_FIELD_DATATYPE                    = $05;
  1268.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PRINT_PROCESSOR}
  1269.   JOB_NOTIFY_FIELD_PRINT_PROCESSOR             = $06;
  1270.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PARAMETERS}
  1271.   JOB_NOTIFY_FIELD_PARAMETERS                  = $07;
  1272.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DRIVER_NAME}
  1273.   JOB_NOTIFY_FIELD_DRIVER_NAME                 = $08;
  1274.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DEVMODE}
  1275.   JOB_NOTIFY_FIELD_DEVMODE                     = $09;
  1276.   {$EXTERNALSYM JOB_NOTIFY_FIELD_STATUS}
  1277.   JOB_NOTIFY_FIELD_STATUS                      = $0A;
  1278.   {$EXTERNALSYM JOB_NOTIFY_FIELD_STATUS_STRING}
  1279.   JOB_NOTIFY_FIELD_STATUS_STRING               = $0B;
  1280.   {$EXTERNALSYM JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR}
  1281.   JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR         = $0C;
  1282.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DOCUMENT}
  1283.   JOB_NOTIFY_FIELD_DOCUMENT                    = $0D;
  1284.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PRIORITY}
  1285.   JOB_NOTIFY_FIELD_PRIORITY                    = $0E;
  1286.   {$EXTERNALSYM JOB_NOTIFY_FIELD_POSITION}
  1287.   JOB_NOTIFY_FIELD_POSITION                    = $0F;
  1288.   {$EXTERNALSYM JOB_NOTIFY_FIELD_SUBMITTED}
  1289.   JOB_NOTIFY_FIELD_SUBMITTED                   = $10;
  1290.   {$EXTERNALSYM JOB_NOTIFY_FIELD_START_TIME}
  1291.   JOB_NOTIFY_FIELD_START_TIME                  = $11;
  1292.   {$EXTERNALSYM JOB_NOTIFY_FIELD_UNTIL_TIME}
  1293.   JOB_NOTIFY_FIELD_UNTIL_TIME                  = $12;
  1294.   {$EXTERNALSYM JOB_NOTIFY_FIELD_TIME}
  1295.   JOB_NOTIFY_FIELD_TIME                        = $13;
  1296.   {$EXTERNALSYM JOB_NOTIFY_FIELD_TOTAL_PAGES}
  1297.   JOB_NOTIFY_FIELD_TOTAL_PAGES                 = $14;
  1298.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PAGES_PRINTED}
  1299.   JOB_NOTIFY_FIELD_PAGES_PRINTED               = $15;
  1300.   {$EXTERNALSYM JOB_NOTIFY_FIELD_TOTAL_BYTES}
  1301.   JOB_NOTIFY_FIELD_TOTAL_BYTES                 = $16;
  1302.   {$EXTERNALSYM JOB_NOTIFY_FIELD_BYTES_PRINTED}
  1303.   JOB_NOTIFY_FIELD_BYTES_PRINTED               = $17;
  1304.  
  1305.  
  1306. type
  1307.   PPrinterNotifyOptionsType = ^TPrinterNotifyOptionsType;
  1308.   {$EXTERNALSYM _PRINTER_NOTIFY_OPTIONS_TYPE}
  1309.   _PRINTER_NOTIFY_OPTIONS_TYPE = record
  1310.     wType: Word;
  1311.     Reserved0: Word;
  1312.     Reserved1: DWORD;
  1313.     Reserved2: DWORD;
  1314.     Count: DWORD;
  1315.     pFields: PWord;
  1316.   end;
  1317.   TPrinterNotifyOptionsType = _PRINTER_NOTIFY_OPTIONS_TYPE;
  1318.   {$EXTERNALSYM PRINTER_NOTIFY_OPTIONS_TYPE}
  1319.   PRINTER_NOTIFY_OPTIONS_TYPE = _PRINTER_NOTIFY_OPTIONS_TYPE;
  1320.  
  1321. const
  1322.   {$EXTERNALSYM PRINTER_NOTIFY_OPTIONS_REFRESH}
  1323.   PRINTER_NOTIFY_OPTIONS_REFRESH  = $01;
  1324.  
  1325. type
  1326.   PPrinterNotifyOptions = ^TPrinterNotifyOptions;
  1327.   {$EXTERNALSYM _PRINTER_NOTIFY_OPTIONS}
  1328.   _PRINTER_NOTIFY_OPTIONS = record
  1329.     Version: DWORD;
  1330.     Flags: DWORD;
  1331.     Count: DWORD;
  1332.     pTypes: PPrinterNotifyOptionsType;
  1333.   end;
  1334.   TPrinterNotifyOptions = _PRINTER_NOTIFY_OPTIONS;
  1335.   {$EXTERNALSYM PRINTER_NOTIFY_OPTIONS}
  1336.   PRINTER_NOTIFY_OPTIONS = _PRINTER_NOTIFY_OPTIONS;
  1337.  
  1338. const
  1339.   {$EXTERNALSYM PRINTER_NOTIFY_INFO_DISCARDED}
  1340.   PRINTER_NOTIFY_INFO_DISCARDED       = $01;
  1341.  
  1342. type
  1343.   PPrinterNotifyInfoData = ^TPrinterNotifyInfoData;
  1344.   {$EXTERNALSYM _PRINTER_NOTIFY_INFO_DATA}
  1345.   _PRINTER_NOTIFY_INFO_DATA = record
  1346.     wType: Word;
  1347.     Field: Word;
  1348.     Reserved: DWORD;
  1349.     Id: DWORD;
  1350.     NotifyData: record
  1351.       case Integer of
  1352.         0: (adwData: array[0..1] of DWORD);
  1353.         1: (Data: record
  1354.               cbBuf: DWORD;
  1355.               pBuf: Pointer;
  1356.             end);
  1357.     end;
  1358.   end;
  1359.   TPrinterNotifyInfoData = _PRINTER_NOTIFY_INFO_DATA;
  1360.   {$EXTERNALSYM PRINTER_NOTIFY_INFO_DATA}
  1361.   PRINTER_NOTIFY_INFO_DATA = _PRINTER_NOTIFY_INFO_DATA;
  1362.  
  1363.   PPrinterNotifyInfo = ^TPrinterNotifyInfo;
  1364.   {$EXTERNALSYM _PRINTER_NOTIFY_INFO}
  1365.   _PRINTER_NOTIFY_INFO = record
  1366.     Version: DWORD;
  1367.     Flags: DWORD;
  1368.     Count: DWORD;
  1369.     aData: array[0..0] of TPrinterNotifyInfoData;
  1370.   end;
  1371.   TPrinterNotifyInfo = _PRINTER_NOTIFY_INFO;
  1372.   {$EXTERNALSYM PRINTER_NOTIFY_INFO}
  1373.   PRINTER_NOTIFY_INFO = _PRINTER_NOTIFY_INFO;
  1374.  
  1375. {$EXTERNALSYM WaitForPrinterChange}
  1376. function WaitForPrinterChange(hPrinter: THandle; Flags: DWORD): DWORD; stdcall;
  1377. {$EXTERNALSYM FindFirstPrinterChangeNotification}
  1378. function FindFirstPrinterChangeNotification(hPrinter: THandle; fdwFlags: DWORD;
  1379.   fdwOptions: DWORD; pPrinterNotifyOptions: Pointer): THandle; stdcall;
  1380. {$EXTERNALSYM FindNextPrinterChangeNotification}
  1381. function FindNextPrinterChangeNotification(hChange: THandle; var pdwChange: DWORD;
  1382.   pvReserved: Pointer; var ppPrinterNotifyInfo: Pointer): BOOL; stdcall;
  1383. {$EXTERNALSYM FreePrinterNotifyInfo}
  1384. function FreePrinterNotifyInfo(pPrinterNotifyInfo: PPrinterNotifyInfo): BOOL; stdcall;
  1385. {$EXTERNALSYM FindClosePrinterChangeNotification}
  1386. function FindClosePrinterChangeNotification(hChange: THandle): BOOL; stdcall;
  1387.  
  1388. const
  1389.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PRINTER}
  1390.   PRINTER_CHANGE_ADD_PRINTER              = $00000001;
  1391.   {$EXTERNALSYM PRINTER_CHANGE_SET_PRINTER}
  1392.   PRINTER_CHANGE_SET_PRINTER              = $00000002;
  1393.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PRINTER}
  1394.   PRINTER_CHANGE_DELETE_PRINTER           = $00000004;
  1395.   {$EXTERNALSYM PRINTER_CHANGE_FAILED_CONNECTION_PRINTER}
  1396.   PRINTER_CHANGE_FAILED_CONNECTION_PRINTER    = $00000008;
  1397.   {$EXTERNALSYM PRINTER_CHANGE_PRINTER}
  1398.   PRINTER_CHANGE_PRINTER                  = $000000FF;
  1399.   {$EXTERNALSYM PRINTER_CHANGE_ADD_JOB}
  1400.   PRINTER_CHANGE_ADD_JOB                  = $00000100;
  1401.   {$EXTERNALSYM PRINTER_CHANGE_SET_JOB}
  1402.   PRINTER_CHANGE_SET_JOB                  = $00000200;
  1403.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_JOB}
  1404.   PRINTER_CHANGE_DELETE_JOB               = $00000400;
  1405.   {$EXTERNALSYM PRINTER_CHANGE_WRITE_JOB}
  1406.   PRINTER_CHANGE_WRITE_JOB                = $00000800;
  1407.   {$EXTERNALSYM PRINTER_CHANGE_JOB}
  1408.   PRINTER_CHANGE_JOB                      = $0000FF00;
  1409.   {$EXTERNALSYM PRINTER_CHANGE_ADD_FORM}
  1410.   PRINTER_CHANGE_ADD_FORM                 = $00010000;
  1411.   {$EXTERNALSYM PRINTER_CHANGE_SET_FORM}
  1412.   PRINTER_CHANGE_SET_FORM                 = $00020000;
  1413.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_FORM}
  1414.   PRINTER_CHANGE_DELETE_FORM              = $00040000;
  1415.   {$EXTERNALSYM PRINTER_CHANGE_FORM}
  1416.   PRINTER_CHANGE_FORM                     = $00070000;
  1417.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PORT}
  1418.   PRINTER_CHANGE_ADD_PORT                 = $00100000;
  1419.   {$EXTERNALSYM PRINTER_CHANGE_CONFIGURE_PORT}
  1420.   PRINTER_CHANGE_CONFIGURE_PORT           = $00200000;
  1421.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PORT}
  1422.   PRINTER_CHANGE_DELETE_PORT              = $00400000;
  1423.   {$EXTERNALSYM PRINTER_CHANGE_PORT}
  1424.   PRINTER_CHANGE_PORT                     = $00700000;
  1425.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PRINT_PROCESSOR}
  1426.   PRINTER_CHANGE_ADD_PRINT_PROCESSOR      = $01000000;
  1427.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PRINT_PROCESSOR}
  1428.   PRINTER_CHANGE_DELETE_PRINT_PROCESSOR   = $04000000;
  1429.   {$EXTERNALSYM PRINTER_CHANGE_PRINT_PROCESSOR}
  1430.   PRINTER_CHANGE_PRINT_PROCESSOR          = $07000000;
  1431.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PRINTER_DRIVER}
  1432.   PRINTER_CHANGE_ADD_PRINTER_DRIVER       = $10000000;
  1433.   {$EXTERNALSYM PRINTER_CHANGE_SET_PRINTER_DRIVER}
  1434.   PRINTER_CHANGE_SET_PRINTER_DRIVER       = $20000000;
  1435.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PRINTER_DRIVER}
  1436.   PRINTER_CHANGE_DELETE_PRINTER_DRIVER    = $40000000;
  1437.   {$EXTERNALSYM PRINTER_CHANGE_PRINTER_DRIVER}
  1438.   PRINTER_CHANGE_PRINTER_DRIVER           = $70000000;
  1439.   {$EXTERNALSYM PRINTER_CHANGE_TIMEOUT}
  1440.   PRINTER_CHANGE_TIMEOUT                  = $80000000;
  1441.   {$EXTERNALSYM PRINTER_CHANGE_ALL}
  1442.   PRINTER_CHANGE_ALL                      = $7777FFFF;
  1443.  
  1444. {$EXTERNALSYM PrinterMessageBoxA}
  1445. function PrinterMessageBoxA(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PAnsiChar;
  1446.   dwType: DWORD): DWORD; stdcall;
  1447. {$EXTERNALSYM PrinterMessageBoxW}
  1448. function PrinterMessageBoxW(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PWideChar;
  1449.   dwType: DWORD): DWORD; stdcall;
  1450. {$EXTERNALSYM PrinterMessageBox}
  1451. function PrinterMessageBox(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PChar;
  1452.   dwType: DWORD): DWORD; stdcall;
  1453.  
  1454. const
  1455.   {$EXTERNALSYM PRINTER_ERROR_INFORMATION}
  1456.   PRINTER_ERROR_INFORMATION   = $80000000;
  1457.   {$EXTERNALSYM PRINTER_ERROR_WARNING}
  1458.   PRINTER_ERROR_WARNING       = $40000000;
  1459.   {$EXTERNALSYM PRINTER_ERROR_SEVERE}
  1460.   PRINTER_ERROR_SEVERE        = $20000000;
  1461.  
  1462.   {$EXTERNALSYM PRINTER_ERROR_OUTOFPAPER}
  1463.   PRINTER_ERROR_OUTOFPAPER    = $00000001;
  1464.   {$EXTERNALSYM PRINTER_ERROR_JAM}
  1465.   PRINTER_ERROR_JAM           = $00000002;
  1466.   {$EXTERNALSYM PRINTER_ERROR_OUTOFTONER}
  1467.   PRINTER_ERROR_OUTOFTONER    = $00000004;
  1468.  
  1469. {$EXTERNALSYM ClosePrinter}
  1470. function ClosePrinter(hPrinter: THandle): BOOL; stdcall;
  1471. {$EXTERNALSYM AddFormA}
  1472. function AddFormA(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1473. {$EXTERNALSYM AddFormW}
  1474. function AddFormW(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1475. {$EXTERNALSYM AddForm}
  1476. function AddForm(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1477. {$EXTERNALSYM DeleteFormA}
  1478. function DeleteFormA(hPrinter: THandle; pFormName: PAnsiChar): BOOL; stdcall;
  1479. {$EXTERNALSYM DeleteFormW}
  1480. function DeleteFormW(hPrinter: THandle; pFormName: PWideChar): BOOL; stdcall;
  1481. {$EXTERNALSYM DeleteForm}
  1482. function DeleteForm(hPrinter: THandle; pFormName: PChar): BOOL; stdcall;
  1483. {$EXTERNALSYM GetFormA}
  1484. function GetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer;
  1485.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1486. {$EXTERNALSYM GetFormW}
  1487. function GetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer;
  1488.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1489. {$EXTERNALSYM GetForm}
  1490. function GetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer;
  1491.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1492. {$EXTERNALSYM SetFormA}
  1493. function SetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1494. {$EXTERNALSYM SetFormW}
  1495. function SetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1496. {$EXTERNALSYM SetForm}
  1497. function SetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1498. {$EXTERNALSYM EnumFormsA}
  1499. function EnumFormsA(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  1500.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1501. {$EXTERNALSYM EnumFormsW}
  1502. function EnumFormsW(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  1503.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1504. {$EXTERNALSYM EnumForms}
  1505. function EnumForms(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  1506.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1507. {$EXTERNALSYM EnumMonitorsA}
  1508. function EnumMonitorsA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  1509.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1510. {$EXTERNALSYM EnumMonitorsW}
  1511. function EnumMonitorsW(pName: PWideChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  1512.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1513. {$EXTERNALSYM EnumMonitors}
  1514. function EnumMonitors(pName: PChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  1515.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1516. {$EXTERNALSYM AddMonitorA}
  1517. function AddMonitorA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  1518. {$EXTERNALSYM AddMonitorW}
  1519. function AddMonitorW(pName: PWideChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  1520. {$EXTERNALSYM AddMonitor}
  1521. function AddMonitor(pName: PChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  1522. {$EXTERNALSYM DeleteMonitorA}
  1523. function DeleteMonitorA(pName, pEnvironment, pMonitorName: PAnsiChar): BOOL; stdcall;
  1524. {$EXTERNALSYM DeleteMonitorW}
  1525. function DeleteMonitorW(pName, pEnvironment, pMonitorName: PWideChar): BOOL; stdcall;
  1526. {$EXTERNALSYM DeleteMonitor}
  1527. function DeleteMonitor(pName, pEnvironment, pMonitorName: PChar): BOOL; stdcall;
  1528. {$EXTERNALSYM EnumPortsA}
  1529. function EnumPortsA(pName: PAnsiChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  1530.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1531. {$EXTERNALSYM EnumPortsW}
  1532. function EnumPortsW(pName: PWideChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  1533.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1534. {$EXTERNALSYM EnumPorts}
  1535. function EnumPorts(pName: PChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  1536.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1537. {$EXTERNALSYM AddPortA}
  1538. function AddPortA(pName: PAnsiChar; hWnd: HWND; pMonitorName: PAnsiChar): BOOL; stdcall;
  1539. {$EXTERNALSYM AddPortW}
  1540. function AddPortW(pName: PWideChar; hWnd: HWND; pMonitorName: PWideChar): BOOL; stdcall;
  1541. {$EXTERNALSYM AddPort}
  1542. function AddPort(pName: PChar; hWnd: HWND; pMonitorName: PChar): BOOL; stdcall;
  1543. {$EXTERNALSYM ConfigurePortA}
  1544. function ConfigurePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
  1545. {$EXTERNALSYM ConfigurePortW}
  1546. function ConfigurePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
  1547. {$EXTERNALSYM ConfigurePort}
  1548. function ConfigurePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
  1549. {$EXTERNALSYM DeletePortA}
  1550. function DeletePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
  1551. {$EXTERNALSYM DeletePortW}
  1552. function DeletePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
  1553. {$EXTERNALSYM DeletePort}
  1554. function DeletePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
  1555. function SetPortA(pName, pPortName: PAnsiChar; dwLevel: DWORD; pPortInfo: Pointer): BOOL; stdcall;
  1556. function SetPortW(pName, pPortName: PWideChar; dwLevel: DWORD; pPortInfo: Pointer): BOOL; stdcall;
  1557. function SetPort(pName, pPortName: PChar; dwLevel: DWORD; pPortInfo: Pointer): BOOL; stdcall;
  1558. {$EXTERNALSYM AddPrinterConnectionA}
  1559. function AddPrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
  1560. {$EXTERNALSYM AddPrinterConnectionW}
  1561. function AddPrinterConnectionW(pName: PWideChar): BOOL; stdcall;
  1562. {$EXTERNALSYM AddPrinterConnection}
  1563. function AddPrinterConnection(pName: PChar): BOOL; stdcall;
  1564. {$EXTERNALSYM DeletePrinterConnectionA}
  1565. function DeletePrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
  1566. {$EXTERNALSYM DeletePrinterConnectionW}
  1567. function DeletePrinterConnectionW(pName: PWideChar): BOOL; stdcall;
  1568. {$EXTERNALSYM DeletePrinterConnection}
  1569. function DeletePrinterConnection(pName: PChar): BOOL; stdcall;
  1570. {$EXTERNALSYM ConnectToPrinterDlg}
  1571. function ConnectToPrinterDlg(hwnd: HWND; Flags: DWORD): THandle; stdcall;
  1572.  
  1573. type
  1574.   PProvidorInfo1A = ^TProvidorInfo1A;
  1575.   PProvidorInfo1W = ^TProvidorInfo1W;
  1576.   PProvidorInfo1 = PProvidorInfo1A;
  1577.   {$EXTERNALSYM _PROVIDOR_INFO_1A}
  1578.   _PROVIDOR_INFO_1A = record
  1579.     pName: PAnsiChar;
  1580.     pEnvironment: PAnsiChar;
  1581.     pDLLName: PAnsiChar;
  1582.   end;
  1583.   {$EXTERNALSYM _PROVIDOR_INFO_1W}
  1584.   _PROVIDOR_INFO_1W = record
  1585.     pName: PWideChar;
  1586.     pEnvironment: PWideChar;
  1587.     pDLLName: PWideChar;
  1588.   end;
  1589.   {$EXTERNALSYM _PROVIDOR_INFO_1}
  1590.   _PROVIDOR_INFO_1 = _PROVIDOR_INFO_1A;
  1591.   TProvidorInfo1A = _PROVIDOR_INFO_1A;
  1592.   TProvidorInfo1W = _PROVIDOR_INFO_1W;
  1593.   TProvidorInfo1 = TProvidorInfo1A;
  1594.   {$EXTERNALSYM PROVIDOR_INFO_1A}
  1595.   PROVIDOR_INFO_1A = _PROVIDOR_INFO_1A;
  1596.   {$EXTERNALSYM PROVIDOR_INFO_1W}
  1597.   PROVIDOR_INFO_1W = _PROVIDOR_INFO_1W;
  1598.   {$EXTERNALSYM PROVIDOR_INFO_1}
  1599.   PROVIDOR_INFO_1 = PROVIDOR_INFO_1A;
  1600.  
  1601. {$EXTERNALSYM AddPrintProvidorA}
  1602. function AddPrintProvidorA(pName: PAnsiChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1603. {$EXTERNALSYM AddPrintProvidorW}
  1604. function AddPrintProvidorW(pName: PWideChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1605. {$EXTERNALSYM AddPrintProvidor}
  1606. function AddPrintProvidor(pName: PChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1607. {$EXTERNALSYM DeletePrintProvidorA}
  1608. function DeletePrintProvidorA(pName, pEnvironment, pPrintProvidorName: PAnsiChar): BOOL; stdcall;
  1609. {$EXTERNALSYM DeletePrintProvidorW}
  1610. function DeletePrintProvidorW(pName, pEnvironment, pPrintProvidorName: PWideChar): BOOL; stdcall;
  1611. {$EXTERNALSYM DeletePrintProvidor}
  1612. function DeletePrintProvidor(pName, pEnvironment, pPrintProvidorName: PChar): BOOL; stdcall;
  1613.  
  1614. { SetPrinterData and GetPrinterData Server Handle Key values }
  1615.  
  1616. const
  1617.   {$EXTERNALSYM SPLREG_DEFAULT_SPOOL_DIRECTORY}
  1618.   SPLREG_DEFAULT_SPOOL_DIRECTORY                    = 'DefaultSpoolDirectory';
  1619.   {$EXTERNALSYM SPLREG_PORT_THREAD_PRIORITY_DEFAULT}
  1620.   SPLREG_PORT_THREAD_PRIORITY_DEFAULT               = 'PortThreadPriorityDefault';
  1621.   {$EXTERNALSYM SPLREG_PORT_THREAD_PRIORITY}
  1622.   SPLREG_PORT_THREAD_PRIORITY                       = 'PortThreadPriority';
  1623.   {$EXTERNALSYM SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT}
  1624.   SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT          = 'SchedulerThreadPriorityDefault';
  1625.   {$EXTERNALSYM SPLREG_SCHEDULER_THREAD_PRIORITY}
  1626.   SPLREG_SCHEDULER_THREAD_PRIORITY                  = 'SchedulerThreadPriority';
  1627.   {$EXTERNALSYM SPLREG_BEEP_ENABLED}
  1628.   SPLREG_BEEP_ENABLED                               = 'BeepEnabled';
  1629.   {$EXTERNALSYM SPLREG_NET_POPUP}
  1630.   SPLREG_NET_POPUP                                  = 'NetPopup';
  1631.   {$EXTERNALSYM SPLREG_EVENT_LOG}
  1632.   SPLREG_EVENT_LOG                                  = 'EventLog';
  1633.   {$EXTERNALSYM SPLREG_MAJOR_VERSION}
  1634.   SPLREG_MAJOR_VERSION                              = 'MajorVersion';
  1635.   {$EXTERNALSYM SPLREG_MINOR_VERSION}
  1636.   SPLREG_MINOR_VERSION                              = 'MinorVersion';
  1637.   {$EXTERNALSYM SPLREG_ARCHITECTURE}
  1638.   SPLREG_ARCHITECTURE                               = 'Architecture';
  1639.  
  1640.  
  1641.   {$EXTERNALSYM SERVER_ACCESS_ADMINISTER}
  1642.   SERVER_ACCESS_ADMINISTER    = $00000001;
  1643.   {$EXTERNALSYM SERVER_ACCESS_ENUMERATE}
  1644.   SERVER_ACCESS_ENUMERATE     = $00000002;
  1645.   {$EXTERNALSYM PRINTER_ACCESS_ADMINISTER}
  1646.   PRINTER_ACCESS_ADMINISTER   = $00000004;
  1647.   {$EXTERNALSYM PRINTER_ACCESS_USE}
  1648.   PRINTER_ACCESS_USE          = $00000008;
  1649.   {$EXTERNALSYM JOB_ACCESS_ADMINISTER}
  1650.   JOB_ACCESS_ADMINISTER       = $00000010;
  1651.  
  1652. { Access rights for print servers }
  1653.  
  1654.   {$EXTERNALSYM SERVER_ALL_ACCESS}
  1655.   SERVER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
  1656.     SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
  1657.   {$EXTERNALSYM SERVER_READ}
  1658.   SERVER_READ = (STANDARD_RIGHTS_READ or SERVER_ACCESS_ENUMERATE);
  1659.   {$EXTERNALSYM SERVER_WRITE}
  1660.   SERVER_WRITE = (STANDARD_RIGHTS_WRITE or
  1661.     SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
  1662.   {$EXTERNALSYM SERVER_EXECUTE}
  1663.   SERVER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or SERVER_ACCESS_ENUMERATE);
  1664.  
  1665. { Access rights for printers }
  1666.  
  1667.   {$EXTERNALSYM PRINTER_ALL_ACCESS}
  1668.   PRINTER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
  1669.     PRINTER_ACCESS_ADMINISTER or PRINTER_ACCESS_USE);
  1670.   {$EXTERNALSYM PRINTER_READ}
  1671.   PRINTER_READ = (STANDARD_RIGHTS_READ or PRINTER_ACCESS_USE);
  1672.   {$EXTERNALSYM PRINTER_WRITE}
  1673.   PRINTER_WRITE = (STANDARD_RIGHTS_WRITE or PRINTER_ACCESS_USE);
  1674.   {$EXTERNALSYM PRINTER_EXECUTE}
  1675.   PRINTER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or PRINTER_ACCESS_USE);
  1676.  
  1677. { Access rights for jobs }
  1678.  
  1679.   {$EXTERNALSYM JOB_ALL_ACCESS}
  1680.   JOB_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or JOB_ACCESS_ADMINISTER);
  1681.   {$EXTERNALSYM JOB_READ}
  1682.   JOB_READ = (STANDARD_RIGHTS_READ or JOB_ACCESS_ADMINISTER);
  1683.   {$EXTERNALSYM JOB_WRITE}
  1684.   JOB_WRITE = (STANDARD_RIGHTS_WRITE or JOB_ACCESS_ADMINISTER);
  1685.   {$EXTERNALSYM JOB_EXECUTE}
  1686.   JOB_EXECUTE = (STANDARD_RIGHTS_EXECUTE or JOB_ACCESS_ADMINISTER);
  1687.  
  1688. {$EXTERNALSYM DeviceCapabilitiesA}
  1689. function DeviceCapabilitiesA(pDevice, pPort: PAnsiChar; fwCapability: Word;
  1690.   pOutput: PAnsiChar; DevMode: PDeviceModeA): Integer; stdcall;
  1691. {$EXTERNALSYM DeviceCapabilitiesW}
  1692. function DeviceCapabilitiesW(pDevice, pPort: PWideChar; fwCapability: Word;
  1693.   pOutput: PWideChar; DevMode: PDeviceModeW): Integer; stdcall;
  1694. {$EXTERNALSYM DeviceCapabilities}
  1695. function DeviceCapabilities(pDevice, pPort: PChar; fwCapability: Word;
  1696.   pOutput: PChar; DevMode: PDeviceMode): Integer; stdcall;
  1697.  
  1698. const
  1699.   winspl = 'winspool.drv';
  1700.  
  1701. implementation
  1702.  
  1703. {$EXTERNALSYM AbortPrinter}
  1704. function AbortPrinter; external winspl name 'AbortPrinter';
  1705. {$EXTERNALSYM AddFormA}
  1706. function AddFormA; external winspl name 'AddFormA';
  1707. {$EXTERNALSYM AddFormW}
  1708. function AddFormW; external winspl name 'AddFormW';
  1709. {$EXTERNALSYM AddForm}
  1710. function AddForm; external winspl name 'AddFormA';
  1711. {$EXTERNALSYM AddJobA}
  1712. function AddJobA; external winspl name 'AddJobA';
  1713. {$EXTERNALSYM AddJobW}
  1714. function AddJobW; external winspl name 'AddJobW';
  1715. {$EXTERNALSYM AddJob}
  1716. function AddJob; external winspl name 'AddJobA';
  1717. {$EXTERNALSYM AddMonitorA}
  1718. function AddMonitorA; external winspl name 'AddMonitorA';
  1719. {$EXTERNALSYM AddMonitorW}
  1720. function AddMonitorW; external winspl name 'AddMonitorW';
  1721. {$EXTERNALSYM AddMonitor}
  1722. function AddMonitor; external winspl name 'AddMonitorA';
  1723. {$EXTERNALSYM AddPortA}
  1724. function AddPortA; external winspl name 'AddPortA';
  1725. {$EXTERNALSYM AddPortW}
  1726. function AddPortW; external winspl name 'AddPortW';
  1727. {$EXTERNALSYM AddPort}
  1728. function AddPort; external winspl name 'AddPortA';
  1729. {$EXTERNALSYM AddPrinterA}
  1730. function AddPrinterA; external winspl name 'AddPrinterA';
  1731. {$EXTERNALSYM AddPrinterW}
  1732. function AddPrinterW; external winspl name 'AddPrinterW';
  1733. {$EXTERNALSYM AddPrinter}
  1734. function AddPrinter; external winspl name 'AddPrinterA';
  1735. {$EXTERNALSYM AddPrinterConnectionA}
  1736. function AddPrinterConnectionA; external winspl name 'AddPrinterConnectionA';
  1737. {$EXTERNALSYM AddPrinterConnectionW}
  1738. function AddPrinterConnectionW; external winspl name 'AddPrinterConnectionW';
  1739. {$EXTERNALSYM AddPrinterConnection}
  1740. function AddPrinterConnection; external winspl name 'AddPrinterConnectionA';
  1741. {$EXTERNALSYM AddPrinterDriverA}
  1742. function AddPrinterDriverA; external winspl name 'AddPrinterDriverA';
  1743. {$EXTERNALSYM AddPrinterDriverW}
  1744. function AddPrinterDriverW; external winspl name 'AddPrinterDriverW';
  1745. {$EXTERNALSYM AddPrinterDriver}
  1746. function AddPrinterDriver; external winspl name 'AddPrinterDriverA';
  1747. {$EXTERNALSYM AddPrintProcessorA}
  1748. function AddPrintProcessorA; external winspl name 'AddPrintProcessorA';
  1749. {$EXTERNALSYM AddPrintProcessorW}
  1750. function AddPrintProcessorW; external winspl name 'AddPrintProcessorW';
  1751. {$EXTERNALSYM AddPrintProcessor}
  1752. function AddPrintProcessor; external winspl name 'AddPrintProcessorA';
  1753. {$EXTERNALSYM AddPrintProvidorA}
  1754. function AddPrintProvidorA; external winspl name 'AddPrintProvidorA';
  1755. {$EXTERNALSYM AddPrintProvidorW}
  1756. function AddPrintProvidorW; external winspl name 'AddPrintProvidorW';
  1757. {$EXTERNALSYM AddPrintProvidor}
  1758. function AddPrintProvidor; external winspl name 'AddPrintProvidorA';
  1759. {$EXTERNALSYM AdvancedDocumentPropertiesA}
  1760. function AdvancedDocumentPropertiesA; external winspl name 'AdvancedDocumentPropertiesA';
  1761. {$EXTERNALSYM AdvancedDocumentPropertiesW}
  1762. function AdvancedDocumentPropertiesW; external winspl name 'AdvancedDocumentPropertiesW';
  1763. {$EXTERNALSYM AdvancedDocumentProperties}
  1764. function AdvancedDocumentProperties; external winspl name 'AdvancedDocumentPropertiesA';
  1765. {$EXTERNALSYM ClosePrinter}
  1766. function ClosePrinter; external winspl name 'ClosePrinter';
  1767. {$EXTERNALSYM ConfigurePortA}
  1768. function ConfigurePortA; external winspl name 'ConfigurePortA';
  1769. {$EXTERNALSYM ConfigurePortW}
  1770. function ConfigurePortW; external winspl name 'ConfigurePortW';
  1771. {$EXTERNALSYM ConfigurePort}
  1772. function ConfigurePort; external winspl name 'ConfigurePortA';
  1773. {$EXTERNALSYM ConnectToPrinterDlg}
  1774. function ConnectToPrinterDlg; external winspl name 'ConnectToPrinterDlg';
  1775. {$EXTERNALSYM DeleteFormA}
  1776. function DeleteFormA; external winspl name 'DeleteFormA';
  1777. {$EXTERNALSYM DeleteFormW}
  1778. function DeleteFormW; external winspl name 'DeleteFormW';
  1779. {$EXTERNALSYM DeleteForm}
  1780. function DeleteForm; external winspl name 'DeleteFormA';
  1781. {$EXTERNALSYM DeleteMonitorA}
  1782. function DeleteMonitorA; external winspl name 'DeleteMonitorA';
  1783. {$EXTERNALSYM DeleteMonitorW}
  1784. function DeleteMonitorW; external winspl name 'DeleteMonitorW';
  1785. {$EXTERNALSYM DeleteMonitor}
  1786. function DeleteMonitor; external winspl name 'DeleteMonitorA';
  1787. {$EXTERNALSYM DeletePortA}
  1788. function DeletePortA; external winspl name 'DeletePortA';
  1789. {$EXTERNALSYM DeletePortW}
  1790. function DeletePortW; external winspl name 'DeletePortW';
  1791. {$EXTERNALSYM DeletePort}
  1792. function DeletePort; external winspl name 'DeletePortA';
  1793. {$EXTERNALSYM DeletePrinter}
  1794. function DeletePrinter; external winspl name 'DeletePrinter';
  1795. {$EXTERNALSYM DeletePrinterConnectionA}
  1796. function DeletePrinterConnectionA; external winspl name 'DeletePrinterConnectionA';
  1797. {$EXTERNALSYM DeletePrinterConnectionW}
  1798. function DeletePrinterConnectionW; external winspl name 'DeletePrinterConnectionW';
  1799. {$EXTERNALSYM DeletePrinterConnection}
  1800. function DeletePrinterConnection; external winspl name 'DeletePrinterConnectionA';
  1801. function DeletePrinterDataA; external winspl name 'DeletePrinterDataA';
  1802. function DeletePrinterDataW; external winspl name 'DeletePrinterDataW';
  1803. function DeletePrinterData; external winspl name 'DeletePrinterDataA';
  1804. {$EXTERNALSYM DeletePrinterDriverA}
  1805. function DeletePrinterDriverA; external winspl name 'DeletePrinterDriverA';
  1806. {$EXTERNALSYM DeletePrinterDriverW}
  1807. function DeletePrinterDriverW; external winspl name 'DeletePrinterDriverW';
  1808. {$EXTERNALSYM DeletePrinterDriver}
  1809. function DeletePrinterDriver; external winspl name 'DeletePrinterDriverA';
  1810. {$EXTERNALSYM DeletePrintProcessorA}
  1811. function DeletePrintProcessorA; external winspl name 'DeletePrintProcessorA';
  1812. {$EXTERNALSYM DeletePrintProcessorW}
  1813. function DeletePrintProcessorW; external winspl name 'DeletePrintProcessorW';
  1814. {$EXTERNALSYM DeletePrintProcessor}
  1815. function DeletePrintProcessor; external winspl name 'DeletePrintProcessorA';
  1816. {$EXTERNALSYM DeletePrintProvidorA}
  1817. function DeletePrintProvidorA; external winspl name 'DeletePrintProvidorA';
  1818. {$EXTERNALSYM DeletePrintProvidorW}
  1819. function DeletePrintProvidorW; external winspl name 'DeletePrintProvidorW';
  1820. {$EXTERNALSYM DeletePrintProvidor}
  1821. function DeletePrintProvidor; external winspl name 'DeletePrintProvidorA';
  1822. {$EXTERNALSYM DeviceCapabilitiesA}
  1823. function DeviceCapabilitiesA; external winspl name 'DeviceCapabilitiesA';
  1824. {$EXTERNALSYM DeviceCapabilitiesW}
  1825. function DeviceCapabilitiesW; external winspl name 'DeviceCapabilitiesW';
  1826. {$EXTERNALSYM DeviceCapabilities}
  1827. function DeviceCapabilities; external winspl name 'DeviceCapabilitiesA';
  1828. {$EXTERNALSYM DocumentPropertiesA}
  1829. function DocumentPropertiesA; external winspl name 'DocumentPropertiesA';
  1830. {$EXTERNALSYM DocumentPropertiesW}
  1831. function DocumentPropertiesW; external winspl name 'DocumentPropertiesW';
  1832. {$EXTERNALSYM DocumentProperties}
  1833. function DocumentProperties; external winspl name 'DocumentPropertiesA';
  1834. {$EXTERNALSYM EndDocPrinter}
  1835. function EndDocPrinter; external winspl name 'EndDocPrinter';
  1836. {$EXTERNALSYM EndPagePrinter}
  1837. function EndPagePrinter; external winspl name 'EndPagePrinter';
  1838. {$EXTERNALSYM EnumFormsA}
  1839. function EnumFormsA; external winspl name 'EnumFormsA';
  1840. {$EXTERNALSYM EnumFormsW}
  1841. function EnumFormsW; external winspl name 'EnumFormsW';
  1842. {$EXTERNALSYM EnumForms}
  1843. function EnumForms; external winspl name 'EnumFormsA';
  1844. {$EXTERNALSYM EnumJobsA}
  1845. function EnumJobsA; external winspl name 'EnumJobsA';
  1846. {$EXTERNALSYM EnumJobsW}
  1847. function EnumJobsW; external winspl name 'EnumJobsW';
  1848. {$EXTERNALSYM EnumJobs}
  1849. function EnumJobs; external winspl name 'EnumJobsA';
  1850. {$EXTERNALSYM EnumMonitorsA}
  1851. function EnumMonitorsA; external winspl name 'EnumMonitorsA';
  1852. {$EXTERNALSYM EnumMonitorsW}
  1853. function EnumMonitorsW; external winspl name 'EnumMonitorsW';
  1854. {$EXTERNALSYM EnumMonitors}
  1855. function EnumMonitors; external winspl name 'EnumMonitorsA';
  1856. {$EXTERNALSYM EnumPortsA}
  1857. function EnumPortsA; external winspl name 'EnumPortsA';
  1858. {$EXTERNALSYM EnumPortsW}
  1859. function EnumPortsW; external winspl name 'EnumPortsW';
  1860. {$EXTERNALSYM EnumPorts}
  1861. function EnumPorts; external winspl name 'EnumPortsA';
  1862. function EnumPrinterDataA; external winspl name 'EnumPrinterDataA';
  1863. function EnumPrinterDataW; external winspl name 'EnumPrinterDataW';
  1864. function EnumPrinterData; external winspl name 'EnumPrinterDataA';
  1865. {$EXTERNALSYM EnumPrinterDriversA}
  1866. function EnumPrinterDriversA; external winspl name 'EnumPrinterDriversA';
  1867. {$EXTERNALSYM EnumPrinterDriversW}
  1868. function EnumPrinterDriversW; external winspl name 'EnumPrinterDriversW';
  1869. {$EXTERNALSYM EnumPrinterDrivers}
  1870. function EnumPrinterDrivers; external winspl name 'EnumPrinterDriversA';
  1871. {$EXTERNALSYM EnumPrintersA}
  1872. function EnumPrintersA; external winspl name 'EnumPrintersA';
  1873. {$EXTERNALSYM EnumPrintersW}
  1874. function EnumPrintersW; external winspl name 'EnumPrintersW';
  1875. {$EXTERNALSYM EnumPrinters}
  1876. function EnumPrinters; external winspl name 'EnumPrintersA';
  1877. {$EXTERNALSYM EnumPrintProcessorDatatypesA}
  1878. function EnumPrintProcessorDatatypesA; external winspl name 'EnumPrintProcessorDatatypesA';
  1879. {$EXTERNALSYM EnumPrintProcessorDatatypesW}
  1880. function EnumPrintProcessorDatatypesW; external winspl name 'EnumPrintProcessorDatatypesW';
  1881. {$EXTERNALSYM EnumPrintProcessorDatatypes}
  1882. function EnumPrintProcessorDatatypes; external winspl name 'EnumPrintProcessorDatatypesA';
  1883. {$EXTERNALSYM EnumPrintProcessorsA}
  1884. function EnumPrintProcessorsA; external winspl name 'EnumPrintProcessorsA';
  1885. {$EXTERNALSYM EnumPrintProcessorsW}
  1886. function EnumPrintProcessorsW; external winspl name 'EnumPrintProcessorsW';
  1887. {$EXTERNALSYM EnumPrintProcessors}
  1888. function EnumPrintProcessors; external winspl name 'EnumPrintProcessorsA';
  1889. {$EXTERNALSYM FindClosePrinterChangeNotification}
  1890. function FindClosePrinterChangeNotification; external winspl name 'FindClosePrinterChangeNotification';
  1891. {$EXTERNALSYM FindFirstPrinterChangeNotification}
  1892. function FindFirstPrinterChangeNotification; external winspl name 'FindFirstPrinterChangeNotification';
  1893. {$EXTERNALSYM FindNextPrinterChangeNotification}
  1894. function FindNextPrinterChangeNotification; external winspl name 'FindNextPrinterChangeNotification';
  1895. {$EXTERNALSYM FreePrinterNotifyInfo}
  1896. function FreePrinterNotifyInfo; external winspl name 'FreePrinterNotifyInfo';
  1897. {$EXTERNALSYM GetFormA}
  1898. function GetFormA; external winspl name 'GetFormA';
  1899. {$EXTERNALSYM GetFormW}
  1900. function GetFormW; external winspl name 'GetFormW';
  1901. {$EXTERNALSYM GetForm}
  1902. function GetForm; external winspl name 'GetFormA';
  1903. {$EXTERNALSYM GetJobA}
  1904. function GetJobA; external winspl name 'GetJobA';
  1905. {$EXTERNALSYM GetJobW}
  1906. function GetJobW; external winspl name 'GetJobW';
  1907. {$EXTERNALSYM GetJob}
  1908. function GetJob; external winspl name 'GetJobA';
  1909. {$EXTERNALSYM GetPrinterA}
  1910. function GetPrinterA; external winspl name 'GetPrinterA';
  1911. {$EXTERNALSYM GetPrinterW}
  1912. function GetPrinterW; external winspl name 'GetPrinterW';
  1913. {$EXTERNALSYM GetPrinter}
  1914. function GetPrinter; external winspl name 'GetPrinterA';
  1915. {$EXTERNALSYM GetPrinterDataA}
  1916. function GetPrinterDataA; external winspl name 'GetPrinterDataA';
  1917. {$EXTERNALSYM GetPrinterDataW}
  1918. function GetPrinterDataW; external winspl name 'GetPrinterDataW';
  1919. {$EXTERNALSYM GetPrinterData}
  1920. function GetPrinterData; external winspl name 'GetPrinterDataA';
  1921. {$EXTERNALSYM GetPrinterDriverA}
  1922. function GetPrinterDriverA; external winspl name 'GetPrinterDriverA';
  1923. {$EXTERNALSYM GetPrinterDriverW}
  1924. function GetPrinterDriverW; external winspl name 'GetPrinterDriverW';
  1925. {$EXTERNALSYM GetPrinterDriver}
  1926. function GetPrinterDriver; external winspl name 'GetPrinterDriverA';
  1927. {$EXTERNALSYM GetPrinterDriverDirectoryA}
  1928. function GetPrinterDriverDirectoryA; external winspl name 'GetPrinterDriverDirectoryA';
  1929. {$EXTERNALSYM GetPrinterDriverDirectoryW}
  1930. function GetPrinterDriverDirectoryW; external winspl name 'GetPrinterDriverDirectoryW';
  1931. {$EXTERNALSYM GetPrinterDriverDirectory}
  1932. function GetPrinterDriverDirectory; external winspl name 'GetPrinterDriverDirectoryA';
  1933. {$EXTERNALSYM GetPrintProcessorDirectoryA}
  1934. function GetPrintProcessorDirectoryA; external winspl name 'GetPrintProcessorDirectoryA';
  1935. {$EXTERNALSYM GetPrintProcessorDirectoryW}
  1936. function GetPrintProcessorDirectoryW; external winspl name 'GetPrintProcessorDirectoryW';
  1937. {$EXTERNALSYM GetPrintProcessorDirectory}
  1938. function GetPrintProcessorDirectory; external winspl name 'GetPrintProcessorDirectoryA';
  1939. {$EXTERNALSYM OpenPrinterA}
  1940. function OpenPrinterA; external winspl name 'OpenPrinterA';
  1941. {$EXTERNALSYM OpenPrinterW}
  1942. function OpenPrinterW; external winspl name 'OpenPrinterW';
  1943. {$EXTERNALSYM OpenPrinter}
  1944. function OpenPrinter; external winspl name 'OpenPrinterA';
  1945. {$EXTERNALSYM PrinterMessageBoxA}
  1946. function PrinterMessageBoxA; external winspl name 'PrinterMessageBoxA';
  1947. {$EXTERNALSYM PrinterMessageBoxW}
  1948. function PrinterMessageBoxW; external winspl name 'PrinterMessageBoxW';
  1949. {$EXTERNALSYM PrinterMessageBox}
  1950. function PrinterMessageBox; external winspl name 'PrinterMessageBoxA';
  1951. {$EXTERNALSYM PrinterProperties}
  1952. function PrinterProperties; external winspl name 'PrinterProperties';
  1953. {$EXTERNALSYM ReadPrinter}
  1954. function ReadPrinter; external winspl name 'ReadPrinter';
  1955. {$EXTERNALSYM ResetPrinterA}
  1956. function ResetPrinterA; external winspl name 'ResetPrinterA';
  1957. {$EXTERNALSYM ResetPrinterW}
  1958. function ResetPrinterW; external winspl name 'ResetPrinterW';
  1959. {$EXTERNALSYM ResetPrinter}
  1960. function ResetPrinter; external winspl name 'ResetPrinterA';
  1961. {$EXTERNALSYM ScheduleJob}
  1962. function ScheduleJob; external winspl name 'ScheduleJob';
  1963. {$EXTERNALSYM SetFormA}
  1964. function SetFormA; external winspl name 'SetFormA';
  1965. {$EXTERNALSYM SetFormW}
  1966. function SetFormW; external winspl name 'SetFormW';
  1967. {$EXTERNALSYM SetForm}
  1968. function SetForm; external winspl name 'SetFormA';
  1969. {$EXTERNALSYM SetJobA}
  1970. function SetJobA; external winspl name 'SetJobA';
  1971. {$EXTERNALSYM SetJobW}
  1972. function SetJobW; external winspl name 'SetJobW';
  1973. {$EXTERNALSYM SetJob}
  1974. function SetJob; external winspl name 'SetJobA';
  1975. function SetPortA; external winspl name 'SetPortA';
  1976. function SetPortW; external winspl name 'SetPortW';
  1977. function SetPort; external winspl name 'SetPortA';
  1978. {$EXTERNALSYM SetPrinterA}
  1979. function SetPrinterA; external winspl name 'SetPrinterA';
  1980. {$EXTERNALSYM SetPrinterW}
  1981. function SetPrinterW; external winspl name 'SetPrinterW';
  1982. {$EXTERNALSYM SetPrinter}
  1983. function SetPrinter; external winspl name 'SetPrinterA';
  1984. {$EXTERNALSYM SetPrinterDataA}
  1985. function SetPrinterDataA; external winspl name 'SetPrinterDataA';
  1986. {$EXTERNALSYM SetPrinterDataW}
  1987. function SetPrinterDataW; external winspl name 'SetPrinterDataW';
  1988. {$EXTERNALSYM SetPrinterData}
  1989. function SetPrinterData; external winspl name 'SetPrinterDataA';
  1990. {$EXTERNALSYM StartDocPrinterA}
  1991. function StartDocPrinterA; external winspl name 'StartDocPrinterA';
  1992. {$EXTERNALSYM StartDocPrinterW}
  1993. function StartDocPrinterW; external winspl name 'StartDocPrinterW';
  1994. {$EXTERNALSYM StartDocPrinter}
  1995. function StartDocPrinter; external winspl name 'StartDocPrinterA';
  1996. {$EXTERNALSYM StartPagePrinter}
  1997. function StartPagePrinter; external winspl name 'StartPagePrinter';
  1998. {$EXTERNALSYM WaitForPrinterChange}
  1999. function WaitForPrinterChange; external winspl name 'WaitForPrinterChange';
  2000. {$EXTERNALSYM WritePrinter}
  2001. function WritePrinter; external winspl name 'WritePrinter';
  2002.  
  2003. end.
  2004.